I am trying to use the Metadata Web Service of Dynamics CRM to update the order of some picklist options using the UpdateAttributeRequest message. Though I get to change the attribute's DisplayName using the MergeLabels = false option, the picklist option values themselves seem immutable.
+2
A:
Have you tried the Order Option Request?
// Create the request.
OrderOptionRequest orderOptionRequest = new OrderOptionRequest();
// Set the properties for the request
orderOptionRequest.AttributeLogicalName = "address1_addresstypecode";
orderOptionRequest.EntityLogicalName = EntityName.contact.ToString();
// Set the order for the options.
orderOptionRequest.Values = new int[] { 4, 3, 2, 1 };
// Execute the request
OrderOptionResponse orderOptionResponse = (OrderOptionResponse)metadataService.Execute(orderOptionRequest);
Matt
2010-06-18 12:54:47
There you go! I knew I was missing something. Thanks a lot!
dsabater
2010-06-21 13:55:52