Update form throw an plug-in crm 4
I try to update an entity with a plugin. I use Image (pre) and stage Post with asynk... The databse is updated in real time, but not the form. Does anybody know why i ha开发者_运维技巧ve to "upate" two times to se the updated text in the webform and the value is updated in the database immediately? I want to se it "immediately". Thanks
With asynchronous plugin execution, the database is never really updated "in real time"; the asynchronous execution might just happen so quickly that it looks that way to a human's "slow" perception. On a server process level, however, the code of an asynchronous plugin will run "when there is time", while the code that rebuilds the form and sends it back to the client is running "immediately" and will wait for synchronous plugins, but not for asynchronous ones.
If you want the changes your plugin makes to be reflected in the entity form immediately after the reload, the plugin has to be registered for synchronous execution.
As far as I know, for asynchronous plugins, as well as for workflows, there is no timeframe in which they are guaranteed to run after being triggered.
精彩评论