LabelQueryExpression LabelQueryExpression LabelQueryExpression LabelQueryExpression Class

Definition

Defines the languages for the labels to be retrieved for metadata items that have labels.

public ref class LabelQueryExpression sealed : Microsoft::Xrm::Sdk::Metadata::Query::MetadataQueryBase
[System.Runtime.Serialization.DataContract(Name="LabelQueryExpression", Namespace="http://schemas.microsoft.com/xrm/2011/Metadata/Query")]
public sealed class LabelQueryExpression : Microsoft.Xrm.Sdk.Metadata.Query.MetadataQueryBase
type LabelQueryExpression = class
    inherit MetadataQueryBase
Public NotInheritable Class LabelQueryExpression
Inherits MetadataQueryBase
Inheritance
LabelQueryExpressionLabelQueryExpressionLabelQueryExpressionLabelQueryExpression
Attributes

Remarks

The number of labels returned for each item depends on the number of language packs installed by the organization. If no additional language packs are installed, there will only be labels for the organization base language. For best performance when additional language packs are installed you can limit labels to those that correspond to the user’s language preference. These preferences can be determined using the values returned by the client-side context getUserLcid function or by querying the UserSettings.UILanguageId value.

The following example shows those portions of the Sample: Query metadata and detect changes which deal with setting the LabelQueryExpression.

MetadataQuery#LabelQueryExpression0,LabelQueryExpression1,LabelQueryExpression2,LabelQueryExpression3

Constructors

LabelQueryExpression() LabelQueryExpression() LabelQueryExpression() LabelQueryExpression()

Initializes a new instance of theLabelQueryExpression class.

Properties

ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data.

(Inherited from MetadataQueryBase)
FilterLanguages FilterLanguages FilterLanguages FilterLanguages

Gets the LCID values for localized labels to be retrieved for metadata items.

MissingLabelBehavior MissingLabelBehavior MissingLabelBehavior MissingLabelBehavior

When this optional parameter is set to 1, the query will include labels for the base language if the label for the requested language is not there.

Applies to