You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I haven't found a way to set synonym for term in TermStore. Term has method AddLabelAndDescription, but it only sets the translation and description fields.
When already set the synonym is stored as second element labels array with isDefault=false, so it can be retrieved, but probably cannot be set currently.
I checked the implementation of AddLabelAndDescription and the issues is that it overwrites the first found element with given language.
However the synonym is stored as another element with the same languagecode, but with isDefault=false. That means, that even if I try to call the method again with isDefault=false, it just overrides the first existing one and throws exception, probably becasue it doesn't have a default one anymore.
This line should probably also check is isDefault equals.
Then I could probably be able to call AddLabelAndDescription("synonym", isDefault=false) to set the synonym
Activity
Zamaroth commentedon Sep 25, 2025
I checked the implementation of AddLabelAndDescription and the issues is that it overwrites the first found element with given language.
However the synonym is stored as another element with the same languagecode, but with isDefault=false. That means, that even if I try to call the method again with isDefault=false, it just overrides the first existing one and throws exception, probably becasue it doesn't have a default one anymore.
This line should probably also check is isDefault equals.
Then I could probably be able to call
AddLabelAndDescription("synonym", isDefault=false)to set the synonymAdam-it commentedon Aug 28, 2026
Thanks, @Zamaroth for the research and sorry for the late response from our side.
Lets open it up. @Zamaroth are you still interested in contributing?