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
AmrenderAmrender 

How to Merge Profiles

Hello Experts

I need to merge two profiles. I would like to know what is best way to do this, specifically for the Field Level Security and Page Layouts. Is there a way to export FLS & Page Layout settings and then merge using any editor or tool.

Thanks in advance!!

Regards
Amrender 
sharathchandra thukkanisharathchandra thukkani
For FLS you have FieldPermissions object. You can query of this object and get  the details for individual profile you can also update the FLS using this object.
For Object Permissions you have ObjectPermissions object.
Vijay NagarathinamVijay Nagarathinam
Hi,

For example, I have two profiles in your sandbox A and B, then delete the profile A in your sandbox, rename the profile B to A.

Then deploy the profile from sandbox to production, then it will be update the field level security and page layouts to profile A.

Let me know if you need any help regarding this.

Thanks,
Vijay.
AmrenderAmrender
Thanks Sharathchandra and Vijay for your responses.

@Vijay if I do so, will it merge the settings or overrite. I need to have settings from both the profiles.

e.g. Profile A has read/write access to field FA and Profile B has read/write to field FB (let's assume both the fields FA & FB are on same object). Now if I go with your approach, will Profile A has read/write access to both the fields?

Thanks
Amrender