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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...