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
I'm setting the value of a property within an event handler
void Document_BeforePublish(Document sender, umbraco.cms.businesslogic.PublishEventArgs e)
I'm trying to find a way for this property to be updated in the content node tree after successfully publishing the node. I find I have to click on the node in the tree before the new property value is displayed.
I've tried
umbraco.library.UpdateDocumentCache(sender.Id);umbraco.library.RefreshContent();
But no luck. Should I be using a different event?
Thanks
Hi Ash
I believe you should use umbraco.library.UpdateDocumentCache(doc.Id); to achieve this.
EDIT: You might want to look at the API cheat sheet in the WIKI here: http://our.umbraco.org/wiki/reference/api-cheatsheet
/Jan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How do I update the property of a node in an event?
I'm setting the value of a property within an event handler
void Document_BeforePublish(Document sender, umbraco.cms.businesslogic.PublishEventArgs e)
I'm trying to find a way for this property to be updated in the content node tree after successfully publishing the node. I find I have to click on the node in the tree before the new property value is displayed.
I've tried
But no luck. Should I be using a different event?
Thanks
Hi Ash
I believe you should use umbraco.library.UpdateDocumentCache(doc.Id); to achieve this.
EDIT: You might want to look at the API cheat sheet in the WIKI here: http://our.umbraco.org/wiki/reference/api-cheatsheet
/Jan
is working on a reply...