asked on June 5, 2020 Show version history

Hello,

We have the following code snippet in c#,

docInfo.SetTemplate("B", newFields, true);
docInfo.Save();

newFields is a FieldValueCollection object.

The code snippet takes an entry, which initially has a template (named A for this example, and this template A has several fields with assigned values).

The code changes the entry template to B and also updates the fields from template B.

I want to assign these new values without losing the old fields, so I'm sending the keepOldFieldValues parameter as true.

 

When running this code, it successfully changes the new template and assigns the new field values, however the old fields are not there anymore.

 

What could have caused this?

 

Regards

0 0