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]);