After the user clicks on the save button, the PreUpdate Plugin is executed to prepare all the necessary operation before the save method takes action; after that, the PostUpdate is here to do its job. So how can we detect or catch only the updated/changed attributes of the entity?
The answer of the previous question is really easy
… You can visualize the changed attributes by using the :
var context = localContext.PluginExecutionContext;
var order = (Entity) context.InputParameters[“Target”];
var order = (Entity) context.InputParameters[“Target”];
So in every Request we will get a different entity, and this is normal because each request will update a different properties, so our entity will contain the data that is currently used in the current message.
The InputParameters property contains the data that is in the request message currently being processed by the event execution pipeline. [MSDN]
0 commentaires:
Enregistrer un commentaire