Updating Existing Documents by Using UmbracoAuthorizedApiController
How to update properties of existing documents using a Controller.
Context:
I have a container page that has hunderts of news documents and each of them has many fields, s.a title, body etc. This documents have also SEO related information s.a metatitle and metadescription.
I want to create a controller that checks if this fields are empty and in case to fill them with existing fields such as title and body.
Follwoing the code of the controller:
There is a HTTP requesto to SEO Controller and private methods.
FillEmptyFields that should check and fill empty fields and another helper that creates a string.
The problem is on FillEmptyFields that does not set the new values and also save them.
Updating Existing Documents by Using UmbracoAuthorizedApiController
How to update properties of existing documents using a Controller. Context: I have a container page that has hunderts of news documents and each of them has many fields, s.a title, body etc. This documents have also SEO related information s.a metatitle and metadescription. I want to create a controller that checks if this fields are empty and in case to fill them with existing fields such as title and body. Follwoing the code of the controller: There is a HTTP requesto to SEO Controller and private methods. FillEmptyFields that should check and fill empty fields and another helper that creates a string. The problem is on FillEmptyFields that does not set the new values and also save them.
Here is the error i see:
Any suggestions?!
Thank You
Hi Edux
Can you check that docs have these properties?
if (string.IsNullOrEmpty(child.Value
is working on a reply...