/// <summary> /// Gets the attribute metadata. /// </summary> /// <param name="entityName">Name of the entity.</param> /// <param name="attributeName">Name of the attribute.</param> /// <returns> /// Crm attribute metadata /// </returns> public override ICrmAttributeMetadata GetAttributeMetadata(string entityName, string attributeName) { var crmAttributeMetadataFactory = new CrmAttributeMetadataFactory(); var attributeResponse = (RetrieveAttributeResponse)this.organizationServiceCache.GetOrganizationService().Execute(new RetrieveAttributeRequest { EntityLogicalName = entityName, LogicalName = attributeName, RetrieveAsIfPublished = true }); return(crmAttributeMetadataFactory.Create(attributeResponse.AttributeMetadata)); }
public override ICrmAttributeMetadata GetAttributeMetadata(string entityName, string attributeName) { CrmAttributeMetadataFactory factory = new CrmAttributeMetadataFactory(); RetrieveAttributeRequest request = new RetrieveAttributeRequest { EntityLogicalName = entityName, LogicalName = attributeName, RetrieveAsIfPublished = true }; RetrieveAttributeResponse response = (RetrieveAttributeResponse)this._organizationService.Execute(request); return(factory.Create(response.AttributeMetadata)); }
/// <summary> /// Gets the attribute metadata. /// </summary> /// <param name="entityName">Name of the entity.</param> /// <param name="attributeName">Name of the attribute.</param> public override ICrmAttributeMetadata GetAttributeMetadata(string entityName, string attributeName) { var crmAttributeMetadataFactory = new CrmAttributeMetadataFactory(); return(crmAttributeMetadataFactory.Create(this.crmMetadataService.RetrieveAttributeMetadata(entityName, attributeName))); }