I'm new with the Umbraco I'm trying to import all the product item to Umbraco Child item and was able to create by the help of the link below. However, I was not able to query the created item to update the value. Can anyone help me out on how?
Thank you so much for your advice. we did a different approach. we just stored the created IContent id somewhere so that when we search the item we can use the _ContentService.GetId(). And the code you provide we used it when the result from _ContentService.GetId() is equal null.
Create and update created Child item Programmatically.
Hi,
I'm new with the Umbraco I'm trying to import all the product item to Umbraco Child item and was able to create by the help of the link below. However, I was not able to query the created item to update the value. Can anyone help me out on how?
https://our.umbraco.com/documentation/Reference/Management/Services/ContentService/Create-content-programmatically
~Kyle
Hi Gean,
can you share your code that you are trying to do the query with?
Hi Brendan,
please see below for the sample code. what we want to achieve is to able to search the created item so we could update it on daily process.
Thank you for your quick response.
~ Kyle
Hi Gean,
Generally speaking, this code looks like not the best architecture.
But you can get node by property value with this code:
It's not the best in terms of performance; you probably have to use Examine index for retrieving existing items or some caching.
Thanks,
Alex
Hi Alex,
Thank you so much for your advice. we did a different approach. we just stored the created IContent id somewhere so that when we search the item we can use the _ContentService.GetId(). And the code you provide we used it when the result from _ContentService.GetId() is equal null.
Thank again. the code is really helpful.
~Gean Kyle
Hi
You choose a better way, cool, thanks for sharing.
Thanks,
Alex
is working on a reply...