Konrad Viltersten
Konrad Viltersten

Reputation: 39250

How to update a field in a post-op plugin?

I have a reason to prefer my plugin to be registered on post-op but I'd need to put something in it (change a field to another value). Do I really have to register it on pre-op or can I shove my update into it despite that the operation has been carried out already?

I'd prefer to avoid firing up an update. The code logic might get a bit crowdy and confusing by that, since there'll be a lot of stuff to do upon a "real" update.

Upvotes: 1

Views: 2641

Answers (1)

Patrick
Patrick

Reputation: 1338

Changes made to the target entity in post-op will not end up in the database unless you run an update manually.

You could consider breaking up your plugin into two. One to change the field in pre-op and one to do whatever it is you're doing in post-op.

Plugins can share data: http://msdn.microsoft.com/en-us/library/gg328579.aspx

Upvotes: 2

Related Questions