There's more...

RemoteExecutionContext contains significantly more detail than what we consumed in our abridged code. You can retrieve the target entity being updated, pre and post images, as well as details about the execution (user, organization, execution stage, and much more). The sample code from MSDN contains a nice utility method that prints a good summary of what the context contains at https://msdn.microsoft.com/en-us/library/gg334377.aspx.

In our code, we used the OnMessage method to consume a message from the queue. Alternatively, you can use the Peek method to keep the message in the queue while inspecting its content.

You can further enhance the code by implementing a two-way listener that will also return a value to Dynamics 365, as described in the MSDN example: https://msdn.microsoft.com/en-us/library/gg334438.aspx. Notice the TwoWayServiceEndpointPlugin interface and how the Execute method returns a value that is then returned to the producer (Dynamics 365).

..................Content has been hidden....................

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