Skip to content

GetTableInfo

David Rivard edited this page Dec 17, 2020 · 1 revision

GetTableInfo (driv_GetTableInfo)

This API can be used to retrieve some information on a table like 'CollectionName', 'SchemaName', "ObjectTypeCode'. The goal is not to replace a Metadata request but to surface some information more easily (ex. via a custom action connector in Power Automate).

Parameters

Input Parameters

Parameter Type Description Required
LogicalName String Entity Logical name X

Output Properties

Property Type Description
Exists Boolean Returns true if the Table exists
DisplayName String DisplayName of the Table
SchemaName String SchemaName of the Table
CollectionName String CollectionName of the Table
CollectionSchemaName String CollectionSchemaName of the Table
PrimaryIdAttribute String PrimaryIdAttribute of the Table
PrimaryNameAttribute String PrimaryNameAttribute of the Table
ObjectTypeCode Integer ObjectTypeCode of the Table

Usage

WebApi:

Request https://{{baseurl}}/api/data/v9.1/driv_GetTableInfo

{
    "LogicalName" : "{{TableLogicalName}}"
}

Response

{
    "@odata.context": "https://{{baseurl}}/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.driv_GetTableInfoResponse",
    "Exists": true,
    "DisplayName": "Account",
    "SchemaName": "Account",
    "CollectionName": "accounts",
    "CollectionSchemaName": "Accounts",
    "ObjectTypeCode": 1,
    "PrimaryIdAttribute": "accountid",
    "PrimaryNameAttribute": "name"
}

Power Automate: