Classe MetadataFilterExpression
Aplica-se a: CRM 2015 on-prem, CRM Online
Specifies complex condition and logical filter expressions used for filtering the results of a metadata query.
Namespace: Microsoft.Xrm.Sdk.Metadata.Query
Assembly: Microsoft.Xrm.Sdk (em Microsoft.Xrm.Sdk.dll)
Sintaxe
'Declaração
<DataContractAttribute(Name:="MetadataFilterExpression", Namespace:="https://schemas.microsoft.com/xrm/2011/Metadata/Query")> _
Public NotInheritable Class MetadataFilterExpression
Implements IExtensibleDataObject
[DataContractAttribute(Name="MetadataFilterExpression", Namespace="https://schemas.microsoft.com/xrm/2011/Metadata/Query")]
public sealed class MetadataFilterExpression : IExtensibleDataObject
Comentários
The following example shows the use of a MetadataFilterExpression to return non-intersect, user-owned entities not found in a list of excluded entities.
// An array SchemaName values for non-intersect, user-owned entities that should not be returned.
String[] excludedEntities = {
"WorkflowLog",
"Template",
"CustomerOpportunityRole",
"Import",
"UserQueryVisualization",
"UserEntityInstanceData",
"ImportLog",
"RecurrenceRule",
"QuoteClose",
"UserForm",
"SharePointDocumentLocation",
"Queue",
"DuplicateRule",
"OpportunityClose",
"Workflow",
"RecurringAppointmentMaster",
"CustomerRelationship",
"Annotation",
"SharePointSite",
"ImportData",
"ImportFile",
"OrderClose",
"Contract",
"BulkOperation",
"CampaignResponse",
"Connection",
"Report",
"CampaignActivity",
"UserEntityUISettings",
"IncidentResolution",
"GoalRollupQuery",
"MailMergeTemplate",
"Campaign",
"PostFollow",
"ImportMap",
"Goal",
"AsyncOperation",
"ProcessSession",
"UserQuery",
"ActivityPointer",
"List",
"ServiceAppointment"};
//A filter expression to limit entities returned to non-intersect, user-owned entities not found in the list of excluded entities.
MetadataFilterExpression EntityFilter = new MetadataFilterExpression(LogicalOperator.And);
EntityFilter.Conditions.Add(new MetadataConditionExpression("IsIntersect", MetadataConditionOperator.Equals, false));
EntityFilter.Conditions.Add(new MetadataConditionExpression("OwnershipType", MetadataConditionOperator.Equals, OwnershipTypes.UserOwned));
EntityFilter.Conditions.Add(new MetadataConditionExpression("SchemaName", MetadataConditionOperator.NotIn, excludedEntities));
MetadataConditionExpression isVisibileInMobileTrue = new MetadataConditionExpression("IsVisibleInMobile", MetadataConditionOperator.Equals, true);
EntityFilter.Conditions.Add(isVisibileInMobileTrue);
Hierarquia de Herança
System.Object
Microsoft.Xrm.Sdk.Metadata.Query.MetadataFilterExpression
Segurança do Thread
Todos os membros estáticos (Shared in Visual Basic) desse tipo são protegidos por thread. Não há nenhum garantia de que os membros de instância sejam protegidos por thread.
Plataformas
Plataformas de desenvolvimento
Windows Vista, Windows Server 2003 e
Plataformas de destino
Windows 98,Windows 2000,Windows 2000 Server,Windows CE,Windows Server 2008,Windows 98 Second Edition,Pocket PC,Smart Phone,Windows Server 2003,Windows XP Professional,Windows Vista,Windows XP
Change History
Consulte também
Referência
Membros de MetadataFilterExpression
Namespace Microsoft.Xrm.Sdk.Metadata.Query
Outros recursos
Query and Capture Changes to Metadata
Sample: Query Metadata and Detect Changes
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.