You need to sign in to do that
Don't have an account?
Ashish Khairkar
custom vf page based on profile
i have this follwing custom page on New Casebutton. But i want only the USers with "Standard User" profile should view this page on NEW CASE button System admin should view the standard Case page. How can i configure this <apex:page standardController="Case"> <style> #spinner{ display: none; width:200px; height: 50px; position: fixed; top: 50%; left: 50%; text-align:center; padding:10px; font:normal 16px Tahoma, Geneva, sans-serif; margin-left: -100px; margin-top: -100px; z-index:2; overflow: auto; border:1px solid #CCC; background-color:white; z-index:100; padding:5px; line-height:20px; } #opaque { position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 1; display: none; background-color: gray; filter: alpha(opacity=30); opacity: 0.3; -moz-opacity:0.3; -khtml-opacity:0.3 } * html #opaque { position: absolute; } </style> <apex:form > <apex:pageMessages id="msgs" /> <apex:pageBlock mode="mainDetail" title="Create Case"> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}" onclick="showSpinner()" /> <apex:commandButton value="Cancel" action="{!cancel}" onclick="showSpinner()" /> </apex:pageBlockButtons> <apex:pageBlockSection title="Details" columns="1"> <apex:inputField value="{!Case.Subject}" /> <apex:inputField style="width:80%" value="{!Case.Description}" /> </apex:pageBlockSection> <apex:pageBlockSection > <apex:inputField value="{!Case.AccountId}" /> <apex:inputField value="{!Case.Type}" /> <apex:inputField value="{!Case.Priority}" /> <apex:inputField value="{!Case.Status}" /> <apex:inputField value="{!Case.Origin}" /> <apex:inputField value="{!Case.Reason}" /> </apex:pageBlockSection> </apex:pageBlock> </apex:form> <div id="opaque"/> <div id="spinner"> <p align="center" style='{font-family:"Arial", Helvetica, sans-serif; font-size:20px;}'><apex:image value="/img/loading.gif"/> Please wait</p> </div> <script> function showSpinner() { document.getElementById('opaque').style.display='block'; var popUp = document.getElementById('spinner'); popUp.style.display = 'block'; } </script> </apex:page>
Approach 2: