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
Karleen MendozaKarleen Mendoza 

Popup Alert on Accounts - using Chrome browser

Hi all, so recently we've had issues with Chrome blocking our Popup Alert app that we have installed. The developer isn't making anymore updates. Is there a way I can just create it myself? The issue we are having is that the alert will not show up in Chrome, but in other browers. Thoughts?
SandhyaSandhya (Salesforce Developers) 
Hi,

You may allow pop ups in chrome.Refer below link.

https://support.google.com/chrome/answer/95472?co=GENIE.Platform%3DDesktop&hl=en
 
You may also try steps in below link

https://www.wikihow.com/Allow-JavaScript-Alerts-to-Show-in-Google-Chrome
 
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
 
Shruti SShruti S
Could you please share the code that you are using to show pop-up alerts ?
Karleen MendozaKarleen Mendoza
Popup alerts and Javascript is enabled on Chrome. The popup alert works on other browsers, but I'd rather not change my users to another browser.

The visualforce pages and such were created by an installed application called Riptide Popup Alert - they're no longer doing updates. So I want to create my own.. just don't know where to start.

The alert pops up everytime I open a record if the field associated with the popup alert has a value in it. So it does not pop up if the field is blank. 

Here is a copy of the code for the visualforce page that the installed app created:
<apex:page standardController="Account">

  <script type="text/javascript"> 
    var s = "";
    var a = "{!JSENCODE(Account.rrpu__Alert_Message__c)}";
    if (a.length > 0)
    { 
      s = "Account Alert: " + a + "\n"; 
    } 
    if (s.length > 0)
    { 
      window.alert(s); 
    } 
  </script> 
  
</apex:page>
Then there is a Custom S Control code:
<html> 
<head> 
<script type="text/javascript"> 
var s = ""; 
function checkAlert() 
{ 
// Look for account message 
try { 
a = "{!JSENCODE(Account.rrpu__Alert_Message__c)}"; 
if (a.length > 0) { 
s += "Account Alert: " + a + "\n"; 
} 
} 
catch(err) { } 

// Look for contact message 
try { 
c = "{!JSENCODE(Contact.rrpu__Alert_Message__c)}"; 
if (c.length > 0) { 
s += "Contact Alert: " + c + "\n"; 
} 
} 
catch(err) { } 

// Look for lead message 
try { 
l = "{!JSENCODE(Lead.rrpu__Alert_Message__c)}"; 
if (l.length > 0) { 
s += "Lead Alert: " + l + "\n"; 
} 
} 
catch(err) { } 

// Look for opportunity message 
try { 
o = "{!JSENCODE(Opportunity.rrpu__Alert_Message__c)}"; 
if (o.length > 0) { 
s += "Opportunity Alert: " + o + "\n"; 
} 
} 
catch(err) { } 

// Look for case message 
try { 
ca = "{!JSENCODE(Case.rrpu__Alert_Message__c)}"; 
if (ca.length > 0) { 
s += "Case Alert: " + ca + "\n"; 
} 
} 
catch(err) { } 

// Pop-up message if any alerts found 
if (s.length > 0) 
{ 
window.alert(s); 
} 
} 

</script> 
</head> 
<body onload="checkAlert()"> 
</body> 
</html>


 
Karleen MendozaKarleen Mendoza
Hi Phil, Thanks for the reply. We decided to discontinue use of the pop-up solution that wasn’t working because of the Chrome updated since it was outdated anyway. We had our outside developers just create a new solution. And I agree, I didn’t want to mess with any security settings so we just opted to move forward with another application to create the popups. Karleen Mendoza Salesforce Software Engineer Direct: 952-641-3148 mobile: 952-303-9606 Wings Insurance Flying Cloud Airport, 14871 Pioneer Trail, Eden Prairie, MN 55347 tel: 952-942-8800 fax: 952-942-8700 web: www.wingsinsurance.aero **** NOTICE: The documents and accompanying e-mail communication may contain confidential and privileged information for the intended recipient only. Further distribution is prohibited without prior approval by the sender. Any viewing, copying or distribution of, or reliance on this message by unintended recipients is prohibited. If you received this message in error, please notify us immediately by replying to this message and delete it from your computer.