I create a global (unbound) action in Dynamics 365 (new_newAction) that accepts an input parameter ( of name Target ) with type (EntityReference) and activate it.
I checked that my action is available throw WebAPI
I want to call it in a JavaScript method, but for testing I wanted to call it from a REST Client ( example Postman, Insomnia SoapUI).
To do that I did the following :
- I use method POST with a json payload
- I put my credential ( other calls to the WebAPI endpoint work)
- I put the Url : server/organization/api/data/v8.2/tgz_newAction
- I put necessary headers :
Accept: application/json
OData-MaxVersion: 4.0
OData-Version: 4.0
Content-Type: application/json; charset=utf-8
- I put the payload but it’s not correct
Example :
{
"inputTarget" :
{
"@odata.type": "Microsoft.Dynamics.CRM.crmbaseentity",
"@odata.id": "78713858-5e81-df11-afdb-00155dba380a",
"@odata.LogicalName": "new_entity",
"@odata.Name": "new_entity"
}
}
But that it’s not working. Do you have any idea ?