userorgroupid: The id of user or group to which access is being granted. To share records using Apex managed sharing, you need to write the Apex code. And it needs userorgroupid field value for sharing records. Example: testShare.UserOrGroupId = userListId;