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
When I create and publish a node and try to retrieve it again I get NULL:
IContent created = cs.CreateContent("MyNode", parentNode.Id, "MyDocTypeAlias", 0); created.SetValue("MyProperty", "blah blah"); cs.Save(created); cs.Publish(created); IPublishedContent node = parentNode.Children.Where(x => x.Name == "MyNode").FirstOrDefault(); // returns null !!
So what am I missing...?
Hi Martin,
Try to use this method for saving:
ApplicationContext.Services.ContentService.SaveAndPublishWithStatus(node);
Also is important to get parentNode and its children after Save and Publish.
Thanks, Alex
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Created node cannot be retrieved until IIS reset
When I create and publish a node and try to retrieve it again I get NULL:
So what am I missing...?
Hi Martin,
Try to use this method for saving:
Also is important to get parentNode and its children after Save and Publish.
Thanks, Alex
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.