Updating filteredaccount view Camzap e randon

For one of our customers, we had created some custom stored procedures in a separate database with CRM plugins to replace their existing SQL triggers.

We required these SPs “as is” because they were having very complex logic inside them and would have taken ample amount of time to re-write the complete logic in CRM plugins.

Use a post create callout to populate corresponding entity type’s max value 1 to the newly-created record, and also to write that new max value to the entry in the Auto Number record for the entity type. Page Info = pages; Retrieve Multiple Request request = new Retrieve Multiple Request(); request. Query = query; Retrieve Multiple Response retrieved = (Retrieve Multiple Response)service.

That way the process fires when offline clients sync their new records to the central database and you end up with no duplicate record contention, since that part of the post callout is (I believe) transaction bound to ensure we don’t get dupes.

Keep this web service call in a common class/method inside your plugin solution, so that, the same can be reused in other plugin classes as well. Pass the above domain name to your custom stored procedure as parameter which can be further used in “Execute AS” command, as shown in below stored procedure.

Note: Make sure you write the “REVERT” command to stop the user impersonation inside your stored procedure.

I knew that the problem is with Application Pool Identity.

updating filteredaccount view-75

I suggested her to add the above application pool identity user to Priv User Group.

User ID property, which is the GUID of the logged in CRM User.

Use this value to retrieve the domain name of logged in CRM user from “systemuser” table.

(One of the auto-generated Active Directory groups.) But, in our case the identity pool user was already added in this group.

To give complete CRM database access, it can also be added to SQLAccess Group, however, the situation was same, and the identity was already added here too. There were two options; either we impersonate the user inside the plugin or at SQL server level. Add a new user in SQL server security logins, the security logins area is displayed in below screen shot.

Leave a Reply