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
noobfnnoobfn 

PopUp window VF

Any thoughts on how to turn off popup from VF? I want the popUP to only show once, and when user clicks ok to remember it's response so pop up doesn't show up again when user refreshes the page or returns to this page. This is what I have in my VF and I'm toggling the checkbox showpopup in my trigger.
if({!opp.ShowPopUp__c==true})
{
var response = confirm("Click OK to clone?");

if(response==true)
{
window.parent.location.href='{!url_str}'+'{!opp.id}';
}
}

sfdcfoxsfdcfox
You could set a cookie (document.cookie) to remember the value that the user previously selected. Of course, if the user clears the cache, etc, they may lose the cookie. Alternatively, consider setting a value in a custom setting (type hierarchy), and it will always be available on the instance.
noobfnnoobfn

Can you show me how, because I don't see how I can apply a custom setting hierchy for this situation?

 

Thank you kindly.