powergate:code_reference:commandlets:get-erpentitytypes

Get-ERPEntityTypes

Cmdlet to retrieve metadata informations about EntityTypes.

Get-ERPEntityTypes [[-Service] <String>] [[-EntitySet] <String>] [<CommonParameters>]

Type Name Description Optional
StringServiceRetrieve all EntityTypes from the specified serviceyes
StringEntitySetRetrieve all EntityTypes from the specified entitySetyes

EntityType[] ← on success
empty ← on error

When calling the Get-ERPEntityTypes without arguments the EntityTypes of all available services are returned.

In the following examples we are using the public OData Services (http://services.odata.org) for demonstration purposes:

Getting all available EntityTypes

Get-ERPEntityTypes

Getting all EntityTypes from the specified Service “OData.svc”

$entityTypes = Get-ERPEntityTypes -Service "OData.svc"
$entityTypes #returns Products, Persons...

Getting all available EntityTypes from the EntitySet “Customers”

$entityTypes = Get-ERPEntityTypes -EntitySet "Customers"
$entityTypes[0].Name #returns Customer