Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peta/c6b712327864676532e8625fe76c7991 to your computer and use it in GitHub Desktop.
Save peta/c6b712327864676532e8625fe76c7991 to your computer and use it in GitHub Desktop.
D365-MetadataBlogPost
Import-Module Microsoft.Xrm.Data.Powershell
$conn = Connect-CrmOnlineDiscovery -InteractiveMode
$req = New-Object Microsoft.Xrm.Sdk.OrganizationRequest
$req.RequestName = "RetrieveSolutionMetadataForComponent"
# Entity "account"
[string[]]$colNames = "entityid"
[string[]]$colValues = "70816501-edb9-4740-a16c-6a5efbc05d84"
$req.Parameters.Add("ColumnNames", $colNames)
$req.Parameters.Add("ColumnValues", $colValues)
$resp = $conn.Execute($req)
<#
> $resp.Results.Item("EntityCollection").Entities | Select-Object -ExpandProperty Attributes
Key Value
--- -----
entityid 70816501-edb9-4740-a16c-6a5efbc05d84
entityrowid fda21dc3-a142-40ab-ba83-f91d7e916760
componentstate 0
solutionid 614c101a-eec3-472d-ace5-bd69894a59d4
overwritetime 2/27/2020 1:01:59 PM
solutionname MicrosoftDynamics_Marketing_patch
entityid 70816501-edb9-4740-a16c-6a5efbc05d84
entityrowid b05bfb97-411a-4839-80c7-dd890a8ffb95
componentstate 0
solutionid 7dc4a5c6-1fc9-4c11-a758-63e5114f719d
overwritetime 2/27/2020 1:01:58 PM
solutionname MicrosoftDynamics_Marketing
entityid 70816501-edb9-4740-a16c-6a5efbc05d84
entityrowid 3b22757d-ffb4-4f8c-9420-636d7c65667c
componentstate 0
solutionid fd140aae-4df4-11dd-bd17-0019b9312238
overwritetime 12/4/2019 6:34:51 PM
solutionname Active
....
entityid 70816501-edb9-4740-a16c-6a5efbc05d84
entityrowid cec30133-b3ac-401f-9758-7efc79ffb3df
componentstate 0
solutionid fd140aad-4df4-11dd-bd17-0019b9312238
overwritetime 11/24/2016 2:41:30 PM
solutionname System
#>
actor client
node app
database db

db -> app
app -> client
@startuml
title CDS metadata about dependencies between solutions and components
skinparam componentStyle uml2
skinparam linetype ortho
entity Dependency {
*dependencyid : Guid
--
dependencytype : OptionSet<DependencyType>
..
*requiredcomponentnodeid : Lookup<DependencyNode>
*requiredcomponentobjectid : Guid
requiredcomponenttype : OptionSet<ComponentType>
*requiredcomponentbasesolutionid : Guid<Solution>
*requiredcomponentparentid : Guid
..
*dependentcomponentnodeid : Lookup<DependencyNode>
*dependentcomponentobjectid : Guid
dependentcomponenttype : OptionSet<ComponentType>
*dependentcomponentbasesolutionid : Guid<Solution>
*dependentcomponentparentid : Guid
}
note right of Dependency : Describes dependency between \ntwo solution components.
entity DependencyNode {
*dependencynodeid : Guid
--
componenttype : OptionSet<ComponentType>
issharedcomponent : bool
*objectid : Guid
*parentid : Guid
*basesolutionid : Lookup<Solution>
*topsolutionid : Lookup<Solution>
}
note left of DependencyNode : Describes
entity Solution {
*solutionid
--
}
Dependency o-- DependencyNode : ancestor=required / descendant=dependent
Dependency *- Solution : required base >
Dependency *- Solution : dependent base >
DependencyNode *- Solution : base >
DependencyNode *- Solution : top >
center footer https://powerblog.io
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment