Hi
I have a requirement were on record save record should get assigned to team and created user don't have privileges to read,write teams record.
I wrote java-script to assign record to a team. now on-save it is throwing error and record is not getting assigned.
error
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: SecLib::AccessCheckEx2 failed. Returned hr = -2147187962, ObjectId: 7dbd6547-7730-ea11-80f5-005056ac4c4c, OwnerId: 170d335a-4eed-e711-80ca-005056ac0707, OwnerIdType: 9 and CallingUser: d364dd0e-a22c-ea11-80f5-005056ac4c4c, CallerBusinessId: 5702bbe8-e8b3-e211-ad26-0050568979d8. ObjectTypeCode: 10216, ObjectBusinessUnitId: e8e43662-5da4-e711-80ce-005056ac4c4c, AccessRights: ReadAccess. Computed rightsToCheck=ReadAccess, grantedRights=8, hsmGrantedRights=None, grantedRightsWithHsm=8.Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>31d40844-34ec-4d44-a0c3-2ff99de9c840</ActivityId>
<ErrorCode>-2147187962</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic" />
<Message>SecLib::AccessCheckEx2 failed. Returned hr = -2147187962, ObjectId: 7dbd6547-7730-ea11-80f5-005056ac4c4c, OwnerId: 170d335a-4eed-e711-80ca-005056ac0707, OwnerIdType: 9 and CallingUser: d364dd0e-a22c-ea11-80f5-005056ac4c4c, CallerBusinessId: 5702bbe8-e8b3-e211-ad26-0050568979d8. ObjectTypeCode: 10216,
ObjectBusinessUnitId: e8e43662-5da4-e711-80ce-005056ac4c4c,
AccessRights: ReadAccess. Computed rightsToCheck=ReadAccess, grantedRights=8, hsmGrantedRights=None, grantedRightsWithHsm=8.</Message>
<Timestamp>2020-01-06T11:26:59.5001191Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>