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

How to auto populate alert message for opportunity closed under a custom object?

I am having one custom object "Site" which has lookup relationship with opportunity. Which means each site record has more than one opportunity. For example if a site record has 5 opportunity in that 4 opportunity has already closed then when i am trying to close the last opportunity in that site record it must display a alert message " your opportunity is closed, would you like to close the site record also yes or no". If i press yes means it must go to that particular site record their we can manually close the site record.


Hey Lavanya,


In this case you will have to override the Close Button on Opportunity detail page which will check the following:

- list of sites it is linked to

- on how many sites is this opportunity the last one to be marked closed


It will then have to proceed and close those sites on which this opportunity is the last one to close. 




Hi Sonam,


        Thanks for  reply. Can you pls tell me more about this.