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
Aki99Aki99 

Assign Permission Set dynamically to users

I have a permission set which restricts its assigned users to edit some fields of a record. I want to assign this permission set to rest of the users which are selected by the record owner using the visualforce page.
When the record owner creates the record he is asked to give permissions to rest of the users for his newly created record to either read or read/write. And thus accordingly assign permission sets to the selected users.

Any idea how can I achieve the same?

Thanks in advance,
Aakash Jain
Amit MalikAmit Malik
I would suggest to have alook at app named permissioner from appexchange.

  
User-added image
Once you install this app, you can see visualforce pages which implement this programmatically.

Enjoy

Amit
Aki99Aki99
Thanks Amit for the reply.
But am looking for a way to do this without any external app installation and only by using apex and VFML in my app.
Any idea for the same?

Regards,
Aakash Jain