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 would like to know if it is possible to specify an item's key when creating the item programmatically; or less preferred, change its key after creation.
I would like to do this for data import feeds where I have a source with keys. In this manner, future updates from the source can look for the item using a direct look up on a key versus index search.
I would like to be able to do this with both content and media items. Is this possible?
I've not attempted this, but according to intelisense Key has a setter, so you could maybe try
var post = _contentService.Create(postName, parent, "forumPost");
post.Key = Guid.Parse(YOUR GUID);
I can confirm this works. For some reason, it just did not even think I could just set the property and save. Thank you.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted