0

For a sample VF page, if depending upon certain logic we want to change visibility of a page for profiles dynamically, how can we do that ? Example - Profile1, Profile2 ....Profile5 have access to VF1. But later on this should change dynamically from Profile1 to 4 thus excluding 5.

Can we modify metadata api in SFDC to achieve that ?

0

Your Visualforce page can inspect the current user context using the $Profile, $Permission (for custom permissions), and $User global merge fields.

You can then conditionally render page elements and content, or dynamically determine whether or not to provide access to specific pieces of functionality.

A solution built around that type of introspection will be more flexible and sustainable, and provide a better user experience, than attempting to use the Metadata API to dynamically change permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.