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
SFDC16SFDC16 

Displaying custom button only when criteria is met and on that button to call VF page.

Narender Singh(Nads)Narender Singh(Nads)
Hi,
Unfortunately, you can't do that in standard page layouts.
What you can do is create another page layout, and remove that custom button from that page layout and then assign that page layout to the profile of that particular user from which you want to hide that button.

Thanks
Satya Prakash ChoudharySatya Prakash Choudhary
Hi,

You can follow below steps to achieve it:

1. Create two pagelayout, one withoiut the button and another with the button which will invoke the VF page.

2. Create two recordtype each one respectively for the above pagelayout.

3. Create a workflow and based on criteria trigger the workflow which have a Field Update action to update the recordtype.

4. set RecordType accordingly to get the right pagelayout, and then invoke the VF page from button.