Introducing the Metadata Source Type in CRM/CDS Source Component

18 October 2022
KingswaySoft Team

It is not unusual to run into a business requirement where you need to extract Dynamics 365 metadata during your ETL process. We used to believe that this was not a general requirement until we recently announced our DES deprecation replacement solution, in which it is important to have a way to retrieve the list of Option Set values along with their label values in the system since Dynamics Entity Changes feature only returns integer values for those set/picklist options.

Recognizing this business requirement, we have recently shipped a new source type in the CRM/CDS source component in our most recent 2022 release wave 1 (v22.1), which allows you to retrieve the following metadata from the system.

  • Entity Metadata
  • Field Metadata
  • Lookup Metadata
  • OptionSet Metadata

Metadata Source Type in CRMCDS Source Component

We will dive into each source type and provide you with a quick overview of the information that you receive within each source option.

Entity Metadata

Using the EntityMetadata option, you will receive a list of all entities in the Dataverse/CDS/CRM system, with the following properties returned (this list may change from version to version in the future). We have added a couple of highlights; all other properties should be self-explanatory.

  • LogicalName
  • ActivityTypeMask
  • AutoRouteToOwnerQueue
  • CanTriggerWorkflow
  • Description
  • DisplayName
  • EntityHelpUrlEnabled
  • EntityHelpUrl
  • IsDocumentManagementEnabled
  • IsOneNoteIntegrationEnabled
  • IsInteractionCentricEnabled
  • IsKnowledgeManagementEnabled
  • IsSLAEnabled
  • IsBPFEntity
  • IsDocumentRecommendationsEnabled
  • AutoCreateAccessTeams
  • IsActivity
  • IsActivityParty
  • IsAuditEnabled
  • IsAvailableOffline
  • IsChildEntity
  • IsAIRUpdated
  • IsValidForQueue
  • IsConnectionsEnabled
  • IsCustomEntity
  • IsBusinessProcessEnabled
  • IsCustomizable
  • IsRenameable
  • IsMappable
  • IsDuplicateDetectionEnabled
  • CanCreateAttributes
  • CanCreateForms
  • CanCreateViews
  • CanCreateCharts
  • CanBeRelatedEntityInRelationship
  • CanBePrimaryEntityInRelationship
  • CanBeInManyToMany
  • CanEnableSyncToExternalSearchIndex
  • SyncToExternalSearchIndex
  • CanModifyAdditionalSettings
  • CanChangeHierarchicalRelationship
  • IsOptimisticConcurrencyEnabled
  • ChangeTrackingEnabled
  • CanChangeTrackingBeEnabled
  • IsImportable
  • IsIntersect - this is true when it is a N:N relationship entity
  • IsMailMergeEnabled
  • IsManaged
  • IsEnabledForCharts
  • IsEnabledForTrace
  • IsValidForAdvancedFind
  • IsVisibleInMobile
  • IsVisibleInMobileClient
  • IsReadOnlyInMobileClient
  • IsOfflineInMobileClient
  • DaysSinceRecordLastModified
  • MobileOfflineFilters
  • IsReadingPaneEnabled
  • IsQuickCreateEnabled
  • ObjectTypeCode - this is the entity type code, it should be noted that entity type code could change between environments after the solution is promoted or deployed
  • OwnershipType
  • PrimaryNameAttribute
  • PrimaryImageAttribute
  • PrimaryIdAttribute
  • RecurrenceBaseEntityLogicalName
  • ReportViewName
  • SchemaName
  • IntroducedVersion
  • IsStateModelAware
  • EnforceStateTransitions
  • EntityColor
  • LogicalCollectionName
  • CollectionSchemaName
  • EntitySetName
  • IsEnabledForExternalChannels
  • IsPrivate
  • UsesBusinessDataLabelTable
  • IsLogicalEntity

Field Metadata

Using the FieldMetadata option, you will receive a list of all fields in the Dataverse/CDS/CRM system from all entities, with the following properties returned (again, this property list may change from version to version in the future). All properties should be self-explanatory.

  • LogicalName
  • AttributeOf
  • AttributeType
  • ColumnNumber
  • Description
  • DisplayName
  • DeprecatedVersion
  • IntroducedVersion
  • EntityLogicalName
  • IsAuditEnabled
  • IsCustomAttribute
  • IsPrimaryId
  • IsPrimaryName
  • IsValidForCreate
  • IsValidForRead
  • IsValidForUpdate
  • CanBeSecuredForRead
  • CanBeSecuredForCreate
  • CanBeSecuredForUpdate
  • IsSecured
  • IsRetrievable
  • IsFilterable
  • IsSearchable
  • IsManaged
  • IsGlobalFilterEnabled
  • IsSortableEnabled
  • LinkedAttributeId
  • IsCustomizable
  • IsRenameable
  • IsValidForAdvancedFind
  • CanModifyAdditionalSettings
  • SchemaName
  • IsLogical
  • InheritsFrom
  • SourceType

Lookup Metadata

Using the LookupMetadata option, you will receive a list of all lookup fields in the Dataverse/CDS/CRM system from all entities, with the following properties returned. We have included a short description of each property below.

  • EntityName - this is the entity’s LogicName
  • FieldName - this should be the lookup field’s LogicalName
  • ReferencedEntity - this is the entity that the lookup can reference to, note that some lookup fields can be multi-targeting, which means that you can expect a lookup field to have multiple rows returned with the ReferencedEntity being different between rows.
  • ReferencedEntityPrimaryKeyField – this should be the lookup entity’s primary key field

OptionSet Metadata

Using the OptionSetMetadata option, you will receive a list of all option set values for each OptionSet or picklist field in the Dataverse/CDS/CRM system from all entities, with the following properties returned. We have included a short description of each property below.

  • EntityName - this is the entity’s LogicName
  • FieldName - this should be the OptionSet/picklist field’s LogicalName
  • OptionValue - this contains the integer value of the option
  • ParentOptionValue - this contains the integer value of the parent option. This is mainly used for statuscode field currently by storing its statecode value. Note that this field is not currently populated when using the WebAPI service endpoint.
  • IsGlobal - this indicates whether it is a global option set.
  • GlobalOptionSetName - this contains the global option set name if the above IsGlobal property is true.
  • IsUserLocalizedLabel - this property indicates whether the localized label below is the localized version in the connection user's locale setting.
  • LocalizedLabel - the localized label of the option
  • LocalizedLabelLanguageCode – the language code of the localized label above.

It should be noted that for one option value, there could be multiple records in the above returned metadata, one has IsUserLocalizedLabel set to true while the other one(s) are for other languages that the system supports.

In working with the DES replacement solution, you would join any entity records with the OptionSetMetadata output in order to populate those option set localized label values.

We hope you find this useful.

Archive

November 2024 3 October 2024 1 September 2024 1 August 2024 2 July 2024 1 June 2024 1 May 2024 1 April 2024 2 March 2024 2 February 2024 2 January 2024 2 December 2023 1 November 2023 1 October 2023 2 August 2023 1 July 2023 2 June 2023 1 May 2023 2 April 2023 1 March 2023 1 February 2023 1 January 2023 2 December 2022 1 November 2022 2 October 2022 2 September 2022 2 August 2022 2 July 2022 3 June 2022 2 May 2022 2 April 2022 3 March 2022 2 February 2022 1 January 2022 2 December 2021 1 October 2021 1 September 2021 2 August 2021 2 July 2021 2 June 2021 1 May 2021 1 April 2021 2 March 2021 2 February 2021 2 January 2021 2 December 2020 2 November 2020 4 October 2020 1 September 2020 3 August 2020 2 July 2020 1 June 2020 2 May 2020 1 April 2020 1 March 2020 1 February 2020 1 January 2020 1 December 2019 1 November 2019 1 October 2019 1 May 2019 1 February 2019 1 December 2018 2 November 2018 1 October 2018 4 September 2018 1 August 2018 1 July 2018 1 June 2018 3 April 2018 3 March 2018 3 February 2018 3 January 2018 2 December 2017 1 April 2017 1 March 2017 7 December 2016 1 November 2016 2 October 2016 1 September 2016 4 August 2016 1 June 2016 1 May 2016 3 April 2016 1 August 2015 1 April 2015 10 August 2014 1 July 2014 1 June 2014 2 May 2014 2 February 2014 1 January 2014 2 October 2013 1 September 2013 2 August 2013 2 June 2013 5 May 2013 2 March 2013 1 February 2013 1 January 2013 1 December 2012 2 November 2012 2 September 2012 2 July 2012 1 May 2012 3 April 2012 2 March 2012 2 January 2012 1

Tags