Monday, May 30, 2011

Item Saving Pipeline change field trigger infinite loop

Recently, my colleague is required to duplicate a field value to another field. let's just say Publish To field. To do this it will need to create a custom pipeline processor on item saving. However we face a problem of infinite loop, because after changing the field value, it triggers the on item saving pipeline again. To solve this issue,

we need to set

item.Editing.EndEdit(true);

after editing the field.

No comments:

Post a Comment