0

I'm changing the ownerId of a record though Apex to another User. Thi The code is running in system context and isn't initiated by a user. Hence even if the user does not have access to the record type, the assignment works.

How do I ensure that the user has update access on this record Type before assigning her as the owner?

Currently we have option to check id user is having access for records .. i want to the same thing if user having new user is having access for record type.. Do we have this option in salesforce

List<UserRecordAccess> listResults= ([SELECT RecordId  FROM UserRecordAccess where UserId = :userid and recordId IN :[recordId] AND HasReadAccess= true]); 
0

Check this out

You need you see if the user's profile has access to the record type since record types are not assigned on per user basis.

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.