Skip to main content
1 of 3
Vandana
  • 121
  • 2

Unable to update the keyword using Tridon Core service

I am trying to copy the keyword value to the metadata field value using Tridion core service.I am able to run the console app successfully without any error but i don't see the metadata filed value get copied.Below is my code, please advice. enter image description here

KeywordData currentKeyword = (KeywordData)client.TryCheckOut(keywordUri, readOptions); string translatedTitle = currentKeyword.Title;

            if (currentKeyword.MetadataSchema.IdRef != "tcm:0-0-0")
            {
                SchemaFieldsData schemaFieldsData = client.ReadSchemaFields(currentKeyword.MetadataSchema.IdRef, true, readOptions);
                SingleLineTextFieldDefinitionData test = new SingleLineTextFieldDefinitionData();
                test = (SingleLineTextFieldDefinitionData)schemaFieldsData.MetadataFields[0];
                test.DefaultValue = translatedTitle;
                currentKeyword = (KeywordData)client.Save(currentKeyword, readOptions); 
            }
Vandana
  • 121
  • 2