Why Pre-Operation is used during Update a Plug-In

天大地大妈咪最大 提交于 2019-12-12 05:17:35

问题


In Microsoft Dynamics CRM Plug-in why at Event Pipeline stage of execution is used Pre-Operation for "Update" message while adding a step in a plug-In. could anyone elaborate this?


回答1:


The plugin pipeline includes the following stages; pre-validation, pre-operation, and post-operation.

Apart from a couple of exceptions these stages are always available. So for the update message the pre-operation is there because that is how the product is designed to work.

In an update message the pre-operation stage could be used for example to:

  • Stop plugin execution by throwing an exception.
  • Inspect values of the record before they are changed.
  • Alter the plugin Target object to change the update applied to the record.



回答2:


MSDN elaborates quite a bit about it: see Event Execution Pipeline.

Abstract (copy-pasted from the linked page):

The Microsoft Dynamics CRM event processing subsystem executes plug-ins based on a message pipeline execution model. A user action in the Microsoft Dynamics CRM Web application or an SDK method call by a plug-in or other application results in a message being sent to the organization Web service. The message contains business entity information and core operation information. The message is passed through the event execution pipeline where it can be read or modified by the platform core operation and any registered plug-ins.



来源:https://stackoverflow.com/questions/39270441/why-pre-operation-is-used-during-update-a-plug-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!