You need to sign in to do that
Don't have an account?

Pop-up alert showing multiple times on case page layout
We need to create Pop-up alert on Case page. We have created Visualforce page with Javascript code for calling alert and placed the Visualforce page in standard case page layout.
When we are opening case, Pop-up alert is getting displayed. However when we do any modifications to the case and save the case, Pop-up alert is again getting called. Is there any way that Pop-up gets called only when we open the case and not when we save the case?
When we are opening case, Pop-up alert is getting displayed. However when we do any modifications to the case and save the case, Pop-up alert is again getting called. Is there any way that Pop-up gets called only when we open the case and not when we save the case?
Can you share the code/markup?
This is the Visualforce code
<apex:page standardController="Case" extensions="CaseContactPopUpController" rendered="{!Case.ShowPopup__c=true}">
<apex:form >
<script>
var Message = '{!strMessage}';
alert(Message);
</script>
</apex:form>
</apex:page>
I am populating strMessage from controller class and I have formula field from Case. If it is true, I am displaying Popup. When I open case or save case, this formula will be true, hence popup is getting displayed multiple times.
Use future method to make that field as true. It works in this way.
1. Once you save the record make the field as false and at the same time call the future method which will make the field as true.
2. Display alert message when field is true.
**** If executing future method with trigger better to use after trigger in this case.
It may help you.
could you write the CaseContactPopUpController controller