function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Beer NutthawanBeer Nutthawan 

Prevent the currency fields from updating when we edit the exchange rate for specific Opportunity's stage

Hi All, 

Will it possible to prevent the secondary currency(value in parentthesis) field from updating when we change the exchange rate? here is example 
Amount: EUR 6,800.00 (USD 7,628.92), once we update exchange rate the 6,800 remains but the 7,628.92 gets changed. 

The reason why we need this is that we want to know the last year USD amount how much we had gained comparing with current year. 
And will it possible to prevent the update for specific Opportunity's Stage, let's say only "closed" we don't want the Amount to get updated? 

Thansk and Regards
Nutthawan P.  
 
Best Answer chosen by Beer Nutthawan
GauravGargGauravGarg
Hi Nuttawan.

This is the standard currency field, which will get calculated once there is any changes in Exchange Currency. To maintain the last year values, you need to write and populate this value into another field. Just like below:
 
1. Create New field of type text.
2. Write before(insert,update) trigger on object. 
3. Query CurencyType for particular currency ISO code. 
4. Calculate the conversion values. 
5. Populate new field with Conversion amount. 
6. Hit save.
Hope this helps. 

Thanks,
Gaurav
SKype: gaurav62990

All Answers

GauravGargGauravGarg
Hi Nuttawan.

This is the standard currency field, which will get calculated once there is any changes in Exchange Currency. To maintain the last year values, you need to write and populate this value into another field. Just like below:
 
1. Create New field of type text.
2. Write before(insert,update) trigger on object. 
3. Query CurencyType for particular currency ISO code. 
4. Calculate the conversion values. 
5. Populate new field with Conversion amount. 
6. Hit save.
Hope this helps. 

Thanks,
Gaurav
SKype: gaurav62990
This was selected as the best answer
Beer NutthawanBeer Nutthawan
Hi GauravGang 

Thanks so much for the solutions, this is a good idea. 

Regards
Nutthawan P. 
GauravGargGauravGarg

Your welcome Nutthawan. Pleasure to help you out. 

You can directly contact me in-case you stuck somewhere in between. 

Thanks,
Gaurav
Skype: gaurav62990