Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Power Platform Data Connector for Common Data Service is not importing Territory.parentTerritoryId

The metadata shows it as a property (https://xxxx.crm.dynamics.com/api/data/v9.1/$metadata), so it looks like PowerBi is not bringing it in. I have included an excerpt of the metadata document below, as well as an example of the json (excerpt)

 

What is odd is that under system, if I look at the "territories" node, it does have the parent territory data, its just the node for "Territory" under "Entities" that is missing the parentTerritoryId. ParentTerritoryId is a microsoft core field (though I believe it got added recently). Because of this, it feels like, its most likely missing as its not part of the CDM.Territory definition (maybe?).

 

The following shows how I can get at the data via the system.territories node. But it would be nice to be able to access this data directly via the Entities.Territory node.

let
Source = Cds.Entities("https://xxxx.crm.dynamics.com/api/data/v9.1", [ReorderColumns=null, UseFormattedValue=null]),
system = Source{[Group="system"]}[Data],
territories_table = system{[Name="territories",Signature="table"]}[Data],
#"Expanded parentterritoryid" = Table.ExpandRecordColumn(territories_table, "parentterritoryid", {"territoryid"}, {"parentterritoryid.territoryid"}),
#"Removed Other Columns" = Table.SelectColumns(#"Expanded parentterritoryid",{"parentterritoryid.territoryid", "territoryid"})
in
#"Removed Other Columns"

 

 

 

<EntityType Name="territory" BaseType="mscrm.crmbaseentity">
<Key>
<PropertyRef Name="territoryid"/>
</Key>
......
<Property Name="_parentterritoryid_value" Type="Edm.Guid"/>
.......
<Property Name="name" Type="Edm.String" Unicode="false"/>
<Property Name="territoryid" Type="Edm.Guid"/>
<NavigationProperty Name="parentterritoryid" Type="mscrm.territory" Nullable="false" Partner="territory_parent_territory">
<ReferentialConstraint Property="_parentterritoryid_value" ReferencedProperty="territoryid"/>
</NavigationProperty>
<NavigationProperty Name="territory_parent_territory" Type="Collection(mscrm.territory)" Partner="parentterritoryid"/>
 
</EntityType>
 
JSON data (excerpt):
 
{"@odata.etag": "W/\"384323864\"","territoryid": "c4f25bba-44c4-e911-a969-000d3a3adab0",_parentterritoryid_value": "87fb2b07-a32c-db11-a80c-0015600c16b8"},
 
Status: New
Comments
v-yuta-msft
Community Support

@Anonymous ,

 

I'm afraid I was not able to reproduce this issue. I would suggest you create a support ticket here.

 

Regards,

Jimmy Tao