How it works...

By passing another user's GUID to the CreateOrganizationService method, we impersonated that user while executing our plugin. Alternatively, we can pass null to impersonate a System User. In this abridged example, we used a hardcoded GUID; however, typically, you will have a separate method call to resolve the GUID given a set of attributes. For example, we might resolve the GUID based on a key, the name of the user, or the role of the user.

It is important to note that hardcoding the GUID is bad practice and an SDLC maintenance nightmare.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.142.248