4 answers
Thanks @Anup Jadhav for you help.We can not modify the Permissions Set if these are the part of package.But we can Insert new Permissions Set by Using Post Install Script.I have Implemented this and my Permissions Set includes:App permissionApex Page & Apex ClassObjects & Field Permissions and may more.If someone needs any help on Permissions Set ( of Standard Objects when these are the part of Package and having Master-Detail relationships with our Custom Objects), Please feel free to post your Comments on this post.Thanks,Kapil Kaushik Can we run scripts on Profiles?
I have installed a Manage Package for all profiles in the Org, now I want to restrict the package access only to certain profiles ?
Instead of doing for each profile manually do you have any automated solution?
@Kapil Kaushik Could you please share your code for adding App permission to Permission set via apex I don't have massive experience with this but I believe this is doable. A bit of googling gives a few links and one of them does show an example of setting permissions set in post install script.https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/push_upgrade_post_install_script.htm Hope this helps!