OrderOptionRequest Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains the data that is needed to set the order for an option set.
For the Web API use the OrderOption Action.
public ref class OrderOptionRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/xrm/2011/Contracts")]
public sealed class OrderOptionRequest : Microsoft.Xrm.Sdk.OrganizationRequest
[<System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/xrm/2011/Contracts")>]
type OrderOptionRequest = class
inherit OrganizationRequest
Public NotInheritable Class OrderOptionRequest
Inherits OrganizationRequest
- Inheritance
- Attributes
Examples
The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationServiceinterface. For the complete sample, see the link later in this topic.
This sample shows how to change the order of options in a local option set. The following sample retrieves a custom PicklistAttributeMetadata attribute and changes the order of the original options using the OrderBy LINQ function to sort items in ascending order by the label text. Then it uses OrderOptionRequest to set the new order of the options for the attribute.
Use the OrderByDecending LINQ function to order the items in descending order.
Remarks
Message Availability
For this message to work, the caller must be connected to the server.
Usage
Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of OrderOptionResponse.
Privileges and Access Rights
To perform this action, the caller must have privileges listed in OrderOption message privileges.
Notes for Callers
You can use this message to edit options for global option sets or local option sets inside a PicklistAttributeMetadata attribute. For global option sets use the OptionSetName property. For local option sets specify the EntityLogicalName and the AttributeLogicalName.
Constructors
| OrderOptionRequest() |
Initializes a new instance of the OrderOptionRequest class |
Properties
| AttributeLogicalName |
Gets or sets the logical name of the PicklistAttributeMetadata attribute. Optional. |
| EntityLogicalName |
Gets or sets the logical name of the entity that contains the attribute. Optional. |
| ExtensionData |
Gets or sets the structure that contains extra data. Optional. (Inherited from OrganizationRequest) |
| Item[String] |
Gets or sets the indexer for the |
| OptionSetName |
Gets or sets the name of the global option set you want to edit options for. Optional. |
| Parameters |
Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes. (Inherited from OrganizationRequest) |
| RequestId |
Gets or sets the ID of an asynchronous operation (system job). Optional. (Inherited from OrganizationRequest) |
| RequestName |
Gets or sets the name of the request. Required, but is supplied by derived classes. (Inherited from OrganizationRequest) |
| SolutionUniqueName |
Gets or sets the name of the solution you want to add the solution component to. Optional. |
| Values |
Gets or sets the array of option values in the wanted order. Required. |