Hi everyone,
I have been pulling my hairs for two days on my part of the script which should set the TM fields update. My code is similar to the one of the SDK documentation but it seems that the field values are not stored in the projectsettings of my project.
Here is my code:
ISettingsBundle projSettings = newSDLProject.GetSettings();
TranslationMemorySettings projTMSettings = projSettings.GetSettingsGroup<TranslationMemorySettings>();
FileBasedTranslationMemory refTM = new FileBasedTranslationMemory(@"C:\Temp\RefTM.sdltm");
FieldValues tmFields = new FieldValues();
FieldDefinition fieldJobNo = refTM.FieldDefinitions["Doc. Code"];
FieldValue fvJob = fieldJobNo.CreateValue();
fvJob.Name = "139998";
tmFields.Add(fvJob);
projTMSettings.ProjectSettings.Value = tmFields;
newSDLProject.UpdateSettings(projSettings);
This block of code is one part of a method where I create a project. I ran before or after having the project but it does not change anything. I am a bit lost and would be happy for some support.
Thanks in advance.
Regards,
Laurent