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
balakrishna mandula 19balakrishna mandula 19 

How to add bulk apex classes and vf pages to permission sets

Hi I want to add bulk apex classes and vf pages to new permission set. There are more than 500 apex classes, and vf pages to be added to permission sets. there are 10 permission sets. it takes lot of time for adding them to PS manually. Is there any automatic process to them to PS

Thanks,
Balakrishna
Best Answer chosen by balakrishna mandula 19
Sumeet_ForceSumeet_Force
Hi , Using Force.com Eclipse or Ant Migration Tool, you can fetch the desired permission sets , apex classes and VF pages and then embed the Classes and VF pages into the permission sets with property e.g. visible with true ..This can be help in bulk addition of classes/VF to permission sets.

All Answers

James WooleyJames Wooley
If you're familiar with the Metadata API, you could look at pulling down Apex Class, vf pages, and permission sets, and update the class and vf page permissions in the permission set directly.
I think the quickest way would be to add the classes and vf pages into one of the permission sets via the UI, then pull down the meatadata, and copy and paste from that permission set into the others, then deploy the updated metadata files. Or perhaps a find and replace on 'false' to 'true' would work on pageaccess and classaccess on the permission set files.
Sumeet_ForceSumeet_Force
Hi , Using Force.com Eclipse or Ant Migration Tool, you can fetch the desired permission sets , apex classes and VF pages and then embed the Classes and VF pages into the permission sets with property e.g. visible with true ..This can be help in bulk addition of classes/VF to permission sets.
This was selected as the best answer