Skip to content

Commit

Permalink
🐛 Force optionset label to 1033 since it's hard coded in CrmSvcUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdurow committed Apr 14, 2021
1 parent 203181a commit 83c531d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spkl/CrmSvcUtilFilteringService/FilteringService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ public bool GenerateOptionSet(OptionSetMetadataBase optionSetMetadata, IServiceP
}

// Set all languages to the user localised version
// This is so that no matter what languages are defined, the user's language is picked up
// 1033 is hard coded in to the default naming service of CrmSvcUtil
foreach (var label in option.Label.LocalizedLabels)
{
label.Label = option.Label.UserLocalizedLabel.Label;
label.LanguageCode = 1033;
}
}

Expand All @@ -85,6 +88,8 @@ public bool GenerateOptionSet(OptionSetMetadataBase optionSetMetadata, IServiceP
foreach (var label in option.Label.LocalizedLabels)
{
label.Label = option.Label.UserLocalizedLabel.Label;
// 1033 is hard coded in to the default naming service of CrmSvcUtil
label.LanguageCode = 1033;
}
});
}
Expand Down

0 comments on commit 83c531d

Please sign in to comment.