Local OptionSets and Status Codes #165
Greggomatic
started this conversation in
General
Replies: 1 comment 1 reply
-
I don't think you can retrieve Local Option sets from Global Option Set metadata. You can either make that local option set global. Or you can retrieve it using RetrieveMetadataChanges function. For example: const metadataRequestParameter = {
Criteria: {
Conditions: [
{
PropertyName: "LogicalName",
ConditionOperator: "0",
Value: {
Type: "System.String",
Value: "contact",
},
},
],
},
LabelQuery: {
FilterLanguages: [1033],
MissingLabelBehavior: 1,
},
AttributeQuery: {
Criteria: {
Conditions: [
{
PropertyName: "IsValidForAdvancedFind",
ConditionOperator: "0",
Value: {
Type: "System.Boolean",
Value: "true",
},
},
],
},
},
Properties: {
PropertyNames: ["LogicalName", "Attributes"],
},
};
const contactMetadata = await dynamicsWebApi.callFunction<RetrieveEntityChangesResponse>({
functionName: "RetrieveMetadataChanges",
parameters: {
Query: metadataRequestParameter,
},
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Great library here - very powerful.
I'm trying to get to an optionset (local) on an entity and seemed to be getting stuck somewhere.
Here is the results from the "retrieveEntity" method...
From there I'm trying to get the options with this code...
Normally I would do this with something like this?
**EntityDefinitions(LogicalName='contact')/Attributes(3423a9b1-891b-44cb-a9b9-28d5a4ffb628)/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$expand=GlobalOptionSet($select=Options)**
Also is there a way to get the options for the statuscode labels?
Beta Was this translation helpful? Give feedback.
All reactions