views:

16

answers:

1

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
There you go! I knew I was missing something. Thanks a lot!
dsabater