Skip to content

GetLocalizedChoiceLabel

David Rivard edited this page Dec 17, 2020 · 1 revision

GetLocalizedChoiceLabel (driv_GetLocalizedChoiceLabel)

This API can be used to retrieve a choice (optionset) label for a known OptionsetValue in the language code passed in parameter (given that the language is installed on the environment)

Parameters

Input Parameters

Parameter Type Description Required
EntityName String Entity Logical name X
Attribute String Attribute schema name X
ChoiceValue Integer Choice (optionset) integer value X
LangCode Integer Language code (ex. English = 1033, French = 1036 ...) X

Output Properties

Property Type Description
Exists Boolean Returns true if the value exists
Value String Label value retrieved

Usage

WebApi

Request https://{{baseurl}}/api/data/v9.1/driv_GetLocalizedChoiceLabel

{
    "EntityName" : "xrm_car",
    "AttributeName" : "xrm_parts",
    "ChoiceValue" : 438590000,
    "LangCode" : 1033
}

Response

{
    "@odata.context": "https://{{baseurl}}/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.driv_GetLocalizedChoiceLabelResponse",
    "Exists": true,
    "Value": "Engine"
}

Power Automate: