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
kstites2001kstites2001 

Opportunity Amount Override

I am needing to override the amount on the opportunity that has products to include additional logic.  Can this be done with an APEX trigger?  Could you do something where it calculates the total price differently or override the amount field?

sfdcfoxsfdcfox

No, Amount is read-only when hasproducts is true. You can use a custom field for your purposes, though.

crop1645crop1645

or -- you could insert a new OpporutnityProduct with productCode of 'adjustment' that is the delta $ change you want in Opportunity.amount