How to Calculate Min. & Max. Opportunity Amount Related to an Account using Apex Trigger
We are back again with another solution to ease your Salesforce development woes. In today’s issue, we will share the Apex code to calculate the minimum and maximum opportunity amount related to an Account. Follow through the steps below to learn how you calculate the Min. & Max. Opportunity Amount Related to an Account using Salesforce Apex Trigger.
Let’s begin.
Step 1
Create two Fields on the Account object on which we want to get the minimum and maximum value amount of the opportunity in our case we created Min and Max.
Step 2
Open the developer console or your choice of IDE to develop the Apex trigger.
Step 3
Write the Apex code as follows
Code
Conclusion
We hope this interests you! Feel free to try the Apex Trigger code to calculate Opportunity Amount Related to an Account in Salesforce. Also, do not forget to check out our tutorials section to get your hands on many such interesting Salesforce development solutions. Stay connected!!