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
VirturionVirturion 

Product updates Opportunity field?

Would ayone have an idea how to accomplish this? I would like to update a dollar amount on an Opportunity based on the products added. So if I have 2 x ProductA $100 and 1 x ProductB $150. I would  update the custom Opportunity field with $350 for instance. I have worked with Triggers from both Opportunites and Products with no luck as of yet.
Vijay RautVijay Raut
There is built in field on Opportunity (Amount) which calculates Amount based on the Quantity and sales price of the Opportunity Product.

If you want something different then you can acheive same using Apex Triggers.

Thanks,
V.R.
VirturionVirturion
We have a need for an additional field on the Opportunity. The second amount would be calculated in a similar fashion. As an example you would have a variable monthly service fee or activation charge in addition to the products base price. This would need to be in a seperate field for additional calculations and reporting. So the possible solutions I've come up with are coding the Opportunity to look for and count the products. Or possibly add an additional dollar amount field to the product and mimic the product x price calculation for the additional field. Any input here would be appreciated.
Vijay RautVijay Raut

There are two options you can use here.

1. How about using formula field which stores Amount from Opportunity.

2. You can also create ROLL UP SUMMARY FIELD which will be SUM of Total Price from OpportunityProduct.

Cheers,

V.R.