+ Start a Discussion

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.

Tirgger is the only solution for this.




Check this...



Magulan D

Salesforce.com certified Force.com Developer.



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

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,