Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Custom action with a complex input parameter (entityreference)

$
0
0

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 ?


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>