You need to sign in to do that
Don't have an account?

Record Type assignment based on user or group
Hello,
If the user is assigned to a 1 record type but there are two on the object how can you program this on save?
I have a Visualforce page that saves records. Upon save the record type is null. I controll record types with visibility. I have done some research however I am comming up a bit short. The permission sets sets the record type. The below methods states that the current users does not require access :( I want to set the record type on save to whatever the permssion set says they have.
getRecordTypeInfos()
Returns a list of the record types supported by this object. The current user is not required to have access to a record type to see it in this list.
getRecordTypeInfosById()
Returns a map that matches record IDs to their associated record types. The current user is not required to have access to a record type to see it in this map.
getRecordTypeInfosByName()
Returns a map that matches record labels to their associated record type. The current user is not required to have access to a record type to see it in this map.
If the user is assigned to a 1 record type but there are two on the object how can you program this on save?
I have a Visualforce page that saves records. Upon save the record type is null. I controll record types with visibility. I have done some research however I am comming up a bit short. The permission sets sets the record type. The below methods states that the current users does not require access :( I want to set the record type on save to whatever the permssion set says they have.
getRecordTypeInfos()
Returns a list of the record types supported by this object. The current user is not required to have access to a record type to see it in this list.
getRecordTypeInfosById()
Returns a map that matches record IDs to their associated record types. The current user is not required to have access to a record type to see it in this map.
getRecordTypeInfosByName()
Returns a map that matches record labels to their associated record type. The current user is not required to have access to a record type to see it in this map.
If this helps,please mark it as best answer to help others.
Go through the below link to learn more about this object :-
https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_permissionsetassignment.htm
If this helps,please mark it as best answer to help others.