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
Lee Franke.ax999Lee Franke.ax999 

Best Practice for determining page based on Role?

We have a custom object that has role based access.

 

There are 3 roles with access to a layout of this object.

 

There is a button on this page "Update" that takes everyone regardless of role to an VF input page (lots of rows and columns)

 

Now we want this"Update"  button to take the user to an input page that is based on their Role (Role 1, Gets Set 1 of columns; Role 2, Set 2; Role 3, Set 3).

 

Is it possible/easiest to overload the button to make this decision or just create a traffic cop VF page that makes the decion and sends the User to the appropriate page?

 

Or is there some other way I have not thought of.

 

thanks,

 

lee

cmlcml

You can do it either way. But i would suggest go with first option of overloading 'Update' button because you already have three visualforce input pages and one more visualforce to just redirect based on role would be redundant.

 

Chandra

Blog:Apex on Force.com - An Object Oriented Approach