| Ijlal Monawwar
Plugins are code components that are attached to the event handler pipeline of an entity to execute their payload. They can be customized to achieve custom business functionality before or after the specified event is performed to modify or augment the standard behavior of the platform. Common examples of events that plugins can be attached to/registered are Create, Update, Delete, Associate, Disassociate, etc. In this blog we will discuss two distinct types of plugins that are Pre-Image and Post-Image plugins.
The Pre-Images and Post-Images are particularly useful in scenarios where we want to compare the data that is changed by the user. Based on the changes the custom operation can be performed. This is because the organization context object (derived from the IPluginExecutionContext class) contains a snapshot of the database before or after the core operation is performed. PreEntityImages contain snapshots of the primary entity's attributes before the core platform operation perform and PostEntityImages contains the snapshot of the primary entity's attributes after the core platform operation performed.
They can be used in applications in update scenarios for example if our table has choice columns and we want to check their value before the operation took place and after the operation took place, they can be a good place to start.
Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.