An error is reported when a dynamics CRM user is automatically added to the team after creation. The error message is: generic SQL error

When implementing a requirement: users are automatically added to a team called “service team” after creation, they encounter a strange error. The error log of CRM is only a simple “generic SQL error.”.


Example code:

//Join the specified team
systemservice. Association (“systemuser”, systemuserid, new relationship (“team membership_association”), relatedentities);

Solution: change the plug-in to asynchronous execution.



Because there are already records about this user and this team in dbo.systemuserprinciples, but this user is clearly new and should not appear in this table. Therefore, you can’t understand the specific reason for the error through the prompt, so you search this as a keyword, Finally, we found the same situation encountered by some people in foreign communities. It is recommended that the reason for this error should be that the system did not complete the creation operation when the systemuser’s postlocation event was triggered. We only need to change the original plug-in to asynchronous execution.


new_ sapinvoiceno

Similar Posts: