You need to sign in to do that
Don't have an account?
sachin kadian 5
Standard Way to override view button
HI,
I want to override view button(Standard detail page) for certain profiles but not for all. What is the standard way to override? I am thinking to use nooverride=1 but not sure if it is a URL hack or standard way. Any help would be appreciated.
Thanks,
I want to override view button(Standard detail page) for certain profiles but not for all. What is the standard way to override? I am thinking to use nooverride=1 but not sure if it is a URL hack or standard way. Any help would be appreciated.
Thanks,
Try these :
http://developer.force.com/cookbook/recipe/overriding-a-page-for-some-but-not-all-users
https://developer.salesforce.com/forums/?id=906F0000000DAA1IAO
Hope that helps!
Note: Mark this as solution if this helps!
All Answers
For your Scenario , I would suggest below idea :
1. Create Hierarchy Custom Setting with a Custom Field of Type CheckBox (isCustomViewApplicable__c) , Default Value = Unchecked , Save it
2. Now, go to the above created Custom Setting, Click on Manage
3. Here , you see, 2 - new buttons, like below :
Create Custom Field:
Click on Manage,
Here you will get to see 2-new buttons, CLICK on the Down-New button below the A|B|CD filters to create records as shown below:
Enter the profile you want to provide access for CUSTOM VIEW redirection and CHECK that CheckBox.
Now you can create as many no# of records you want for different profiles :
after that, you will see #of entries created like shown below:
Override View Button on your object, redirect it to your VF page (URL)
In your controller for the above VF page, get the Hierarchy Custom Setting created above and do the validation based on that CheckBox created in settings.
If the Logged In User's Profile matching with the any of profiles in Hierarchy Custom Setting has this checkbox enabled ? Redirect them to VF page you created Else to the Standard View Page (SF URL i.e /RecordId)
Hope that helps!
Note: Mark this as solution if this helps!
Your answer make sense. But my doubt is in last part only.If i will override the "View" button, and a user comes for which i want to show the standard view page(SF URL i.e /RecordId ) how should i do this? because "view" button is override, if I will redirect it to /RecordId, it will again come on same page and it will create a infinite for loop. So one option is i will use "/RecordId?nooverride=1" but I am not sure if this is a standard way to do this. So i just wanted to know, is there any other way to redirect the user from overridden page to standard page.
Try these :
http://developer.force.com/cookbook/recipe/overriding-a-page-for-some-but-not-all-users
https://developer.salesforce.com/forums/?id=906F0000000DAA1IAO
Hope that helps!
Note: Mark this as solution if this helps!