Plug-in Images (Pre vs. Post)

Plug-In Images (Pre vs. Post)

Plug-In images are snapshots of the entity’s attributes, before and after the core system operation. Following table shows when in the event pipeline different images are available:

Message Stage Pre-Image Post-Image
Create PRE No No
Create POST No Yes
Update PRE Yes No
Update POST Yes Yes
Delete PRE Yes No
Delete POST Yes No

The benefits of images

  • One of the best uses for this is in update plug-ins. As mentioned before, update plug-in target entity only contains the updated attributes. However, often the plug-in will require information from other attributes as well. Instead of issuing a retrieve, the best practice is to push the required data in an image instead.
  • Comparison of data before and after. This allows for various audit-type plugins, that logs what the value was before and after, or calculating the time spent in a stage or status.

The next section of this chapter covers how to start developing a plug-in, plus some examples of plug-ins.

Do More with Dynamics 365

Expand your knowledge of Dynamics 365 through PowerObjects’ educational blogs.  Looking to learn in a more formal setting?  Check out our in-person training courses.

Want to learn development skills?  Check out Developer Environment and Developer Extending events.