Post-Operation: Plug-in will run after the values have been inserted or changed on the database.
Pre-Images & Post-Images?
Entity images are snapshots of CRM records that are stored on database either before the database operation is completed or after the completion of database operation.
It is the snapshot of the entities’ attributes data before saving on the database. The following image shows pre-image availability.
It is the snapshot of the entities’ attributes data after saving on the database. The following image shows post-image availability.
Pre-Image & Post-Image Example:
Whenever a parent account field is updated on the account entity, we want to retrieve the old value of the field and update in pre-value field.
Register a plug-in in account entity and register a step update account name field and select stage as post-operation.
Register an image step on update step. Give some names to pre-image and post-image checkbox Select attribute to display pre and post image values.
Example Code for Pre-Image and Post-Image
Here we update the account name and parent account.
Pre-Image value updated with parent account value and Post-image value of phone field updated with postvalue of parent account field.
Need help in Microsoft Dynamics 365/CRM Plug-in development? Contact firstname.lastname@example.org.