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
Arif Iqbal 5Arif Iqbal 5 

Want a pop message appears when a stage is closed won and before the Opp is saved in SFDC

Hi Team,

Scenario.
Currently I have stages on Opps and Products. Some of the stages map to the Product stage so users do not have to manually update them but can also be independly updated.

If an Opportuntity is set to Closed Issued and Product stage is at Proceeding Or commitment once the Opp is saved the Stage automaticall gets updated on Products to Closed Issued which is fine. But what I am trying to do is have a pop message display on the Opp screen when the stage is set to Closed Issued and before Saving the record to state to the user that they need to be sure they would like t save the Opportunity with Stage Closed Issued as it will update the Product stages.

So far I have the following VF page and embedded the ppage on the page layout but not working as expected any help would be great

<apex:page standardController="Opportunity" rendered="{!Opportunity.StageName == 'Closed Issued'}">
 <script type="text/javascript">
  { window.alert("All Products will be set to Closed Issued except those products with a status of Closed Not Issued,"); }
 </script>
</apex:page>
NagendraNagendra (Salesforce Developers) 
Hi Arif,

Sorry for this issue you are encountering.

May I suggest you please check below link from the success community with a similar discussion which might help you further. Kindly tweak the stage closed lost as closed won as per your requirement.

Please let us know if this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra