Following up on my previous post on Get-D365ODataPublicEntity, I wanted to show a bit more on how it can be used.
Get-D365ODataPublicEntity can work with both the entity name and the entity set name:
1 2 3 4 |
PS C:\> Get-D365ODataPublicEntity -EntityName CustomerV3 Name : CustomerV3 EntitySetName : CustomersV3 |
For example, want to get the URL of an entity?
1 2 3 4 5 |
PS C:\> Get-D365ODataPublicEntity -EntityName CustomersV3 | Get-D365ODataEntityUrl https://afahrenholz-dev24d2d448f42b83303devaos.cloudax.dynamics.com/data/CustomersV3 PS C:\> Get-D365ODataPublicEntity -EntityName CustomerV3 | Get-D365ODataEntityUrl https://afahrenholz-dev24d2d448f42b83303devaos.cloudax.dynamics.com/data/CustomersV3 |
Want to see the key fields of an entity?
1 2 3 4 5 6 |
PS C:\> Get-D365ODataPublicEntity -EntityName CustomerV3 | Get-D365ODataEntityKey | Select -ExpandProperty Keys FieldName DataType --------- -------- dataAreaId String CustomerAccount String |
Find entities with a certain property?
Find entities with actions is as easy as:
1 2 3 |
$entities = Get-D365ODataPublicEntity $entities | Where-Object {$_.Actions -ne $null} | Format-Wide |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
PS C:\> $entities | Where-Object {$_.Actions -ne $null} | Format-Wide AccountTranslation AccrualScheme AllocationForMainAccount AssetJournalLine BalanceControl BatchGroup BenefitEligibilityPolicyRuleType BillOfMaterialsHeader BillOfMaterialsVersion BillOfMaterialsVersionODataV2 BpstConfigurationEntity BudgetAllowTransferRule BudgetCode BudgetControlConfiguration BudgetControlCycleModel BudgetControlDimensionAttribute BudgetControlDocumentsAndJournals BudgetControlGroup BudgetControlGroupCriterion BudgetControlRuleCriterion BudgetCycle BudgetDimension BudgetParameters BudgetPlanWorksheet BudgetRegisterEntry BudgetRegisterEntryHeader BudgetRegisterEntryLine BusinessEventsCatalog CashFlowForecastExternalSourceEntry CDSAIntegrationEntity Currency CustomerPaymentJournalLine DataManagementDefinitionGroup DataManagementEntity DataManagementTemplate DefaultDescriptions DimensionAttribute DimensionAttributeTranslation DimensionCombination DimensionIntegrationFormat DimensionSet DocumentRoutingClientApp DualWriteProjectConfiguration ExpenseJournalLine FinancialDimensionValueTranslation JournalTrans Kitting_KitHeader Ledger LedgerEliminationRule LedgerEliminationRuleLine LedgerJournalLine OrderCommittedLicensePlateReservation PeriodCloseTemplateTask Project RetailStoreTenderTypeTable RouteHeader RouteVersion RouteVersionV2 SystemNotification SystemNotificationUser TransferOrderHeader TransferOrderLine TransferPrice ValidationProjectTask ValidationProjectTaskStatus VendInvoiceJournalLine VendorPaymentJournalLine Workflow WorkflowExternalElement WorkflowInstantFlow WorkflowWorkItem |
We’ll use this in the next post on Invoke-D365ODataEntityAction
🙂