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
SA.ax1574SA.ax1574 

Apex Development

Hi All, I am new to salesforce development . I have a requirement. I have a field like Opportunity currency(standard field) in Opportunity object. After created the opportunity nobody are able to edit the currency field. because that Opportunity have some products. So So we are try to add some code that does this for them - e.g. a visual force page where they choose the new currency, and the controller deletes the products, changes the currency and then adds the products back again. anybody please provide sample code to resolve the above issue.
MagulanDuraipandianMagulanDuraipandian

Tirgger is the only solution for this.

 

https://sites.google.com/site/infallibletechie/when-to-use-triggers-in-salesforce

 

Check this...

 

Regards,

Magulan D

Salesforce.com certified Force.com Developer.

SFDC Blog

SFDC Site

If this post is your solution, kindly mark this as the solution.

SA.ax1574SA.ax1574
Thanks for your response. I am new to salesforce development . can you please provide the trigger logic if possible. Ex: trigger deleteandaddproducts on Opportunity (before update,after update) { // Need logic to delete the Opportunity products when before update // and add deleted opportunity records into opportunity after update } Anybody please help me out...... Thanks,