Skip to content

Commit

Permalink
Merge pull request #417 from /issues/349-unknown-label
Browse files Browse the repository at this point in the history
🐛 Force optionset label to 1033 since it's hard coded in CrmSvcUtil
  • Loading branch information
scottdurow authored Apr 28, 2021
2 parents 3b37f6b + 83c531d commit f54f910
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 f54f910

Please sign in to comment.