3

Can we assign particular record types to profiles using Apex? My scenario is , if we select profile and record type, then that record type is automatically assigned to that particular profile using apex.

I am getting profile and record type ID using the following SOQL queries,

[SELECT id,name,SObjectType from RecordType]
[SELECT Id,name FROM Profile]

but i can't update profile with record type.

1 Answer 1

3

You can use Financial Force's Metadata API Wrapper to access the metadata API. You'd need to use the Metadata API to assign record types to profiles, because this is not a normal type of metadata that you can update directly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .