Some new record types were created to a custom object,how can i assign them to n number of profiles instead of manually editing each profile.(The problem is there are around 85 profile that needs to be updated.)


According to this, profiles can't be updated via DML operations, so updating profiles directly in Apex isn't possible. The record type on the profile is accessible via the metadata API.

DemandTools from CRMFusion will update profiles. Within DemandTools, you'd probably want the MassImpact tool. You can set conditions which pick the records to update and create formulas which determine the update value. Probably not worth it just to update 85 profiles, but that's the only non-manual way I know (besides the metadata API).

Note: I'm not connected with CRMFusion; I'm just a satisfied customer.


The only work-around that I've been able to come up with is the create another "new" Record Type and use your "old new" Record Type as the template. That will allow you to Mass-Assign the "new new" Record Type to the Profiles, then you can deactivatre/delete the "old new" Record Type.

steve molis mentioned here https://success.salesforce.com/answers?id=90630000000gwV2AAI

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.