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

pop-up help
So I have created this pop up when cases are logged as critical cases to remind the customer to call the hotline.
Problem 1 - I works fine in IE and Chrome, only thing in Chrome, you can't see the style sheet colors. Anyone know how to remedy this?
Problem 2 & 3 - it doesn't show up when logged in as Partner and Customer portal users, works fine as myself (admin). Is there any way to turn this "on" to portal users. This is who really needs the reminder
Apex Page:
<apex:page standardController="Case" rendered="{!Case.Impact__c = 'Site Production Down'}" extensions="CW_alertMessage"> <script type="text/javascript"> { window.showModalDialog("{!urlRec}","dialogWidth:1200px; dialogHeight:200px; center:yes"); } </script> </apex:page>
Apex Page with Alert Message:
<apex:page standardStylesheets="false" showHeader="false"> <apex:stylesheet value="{!$Resource.mystyle}"/> <h1 class="myStyle">You have indicated that site operations is critically impaired.</h1> <p>Please contact <b>800-480-9830</b> to ensure Product Support is aware of your incident. <br><br>If site operations is not currently critically impaired, please adjust the value <br>in the <b>IMPACT</b> field to accurately reflect current site functionality</br></br></br></p> </apex:page>
Apex Class:
public with sharing class CW_alertMessage { public CW_alertMessage(ApexPages.StandardController controller) { } public string geturlRec() { string urlRec='https://caterpillar--cw.cs15.my.salesforce.com/apex/CW_AlertMessagePage'; return urlRec; } }
Static Resource:
body {
background-color: #236FBD;
}
.pbTitle {
background-color: yellow;
}
.myStyle {
background-color: red;
}
Problem 2 & 3: In your getUrlRec method, I would change it to this:
Sites don't typically use the /apex/pagename syntax and so the above method will pull the appropriate URL for that page depending on the context. Secondly, be sure to the at the profile for the sites guest users. There will be a section for enabled vf pages. Be sure to add your page.
All Answers
Problem 2 & 3: In your getUrlRec method, I would change it to this:
Sites don't typically use the /apex/pagename syntax and so the above method will pull the appropriate URL for that page depending on the context. Secondly, be sure to the at the profile for the sites guest users. There will be a section for enabled vf pages. Be sure to add your page.
Thanks cmoyle. Do I need to change anything in my page too? Its still not working.
Are you getting any kind of error or is the modal simply not rendering anything?
Well I'm stumped, I spun up a developer org and tested it out and was able to see my modal window in both sites and internal. Best I can say is make sure the public access profile on your site has access to all objects and pages that both the main page and the modal will access. I also noticed you change urlRec to getUrl...I can't see that being the problem, but make sure its referencing something in your controller. If I think of anything, I'll get back to you.
Just had a DO'H moment! I forgot I had removed the VF Page from the layout cause it was annying me when testing something else last week. I added it back and now its working for everyone! Thank you!
one more question for you. Wondering if this is doable BEFORE a case is entered? For instance, the user is filling out the case information and they choose Impact as Site Down. Once they select that, before they even click Save, can this message pop up?