Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
A question about the property service, on the saved event.
if i use the onsaving event:
void ContentService_Saving(IContentService sender, SaveEventArgs<IContent> e) { foreach (IContent node in e.SavedEntities) { if(node.IsPropertyDirty("property name")) { //Do something } } }
When i edit the property it is true and the code would work as i expect.
However if i do the same thing on the saved event and use was property dirty, it will always return true even if i have not edited the property in the CMS.
void ContentService_Saved(IContentService sender, SaveEventArgs<IContent> e) { foreach (IContent node in e.SavedEntities) { if(node.WasPropertyDirty("property name")) { //Do something } } }
Am i missing something here why would a property be marked dirty if it hasn't been changed?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Property was dirty on saved
A question about the property service, on the saved event.
if i use the onsaving event:
When i edit the property it is true and the code would work as i expect.
However if i do the same thing on the saved event and use was property dirty, it will always return true even if i have not edited the property in the CMS.
Am i missing something here why would a property be marked dirty if it hasn't been changed?
is working on a reply...