โ10-20-2023 06:43 AM
Im looking at the Dynamics CRM connector and I have hit a situation where I need to specify a multipart request (inorder to use there batch api) however the standard connector does not seem to support this action. i do see that custom action is supported however this body is always Json...
Do I need to make my own connector to handle this action or is there something I'm just overlooking e.g. a way do define a multipart request as Json.
example Microsoft batch
POST [Organization Uri]/api/data/v9.2/$batch HTTP/1.1
OData-MaxVersion: 4.0
OData-Version: 4.0
If-None-Match: null
Accept: application/json
Content-Type: multipart/mixed; boundary="batch_80dd1615-2a10-428a-bb6f-0e559792721f"
--batch_80dd1615-2a10-428a-bb6f-0e559792721f
Content-Type: application/http
Content-Transfer-Encoding: binary
POST /api/data/v9.2/tasks HTTP/1.1
Content-Type: application/json; type=entry
{
"subject": "Task 1 in batch",
"regardingobjectid_account_task@odata.bind": "accounts(00000000-0000-0000-0000-000000000001)"
}
--batch_80dd1615-2a10-428a-bb6f-0e559792721f
Content-Type: application/http
Content-Transfer-Encoding: binary
POST /api/data/v9.2/tasks HTTP/1.1
Content-Type: application/json; type=entry
{
"subject": "Task 2 in batch",
"regardingobjectid_account_task@odata.bind": "accounts(00000000-0000-0000-0000-000000000001)"
}
--batch_80dd1615-2a10-428a-bb6f-0e559792721f
Content-Type: application/http
Content-Transfer-Encoding: binary
POST /api/data/v9.2/tasks HTTP/1.1
Content-Type: application/json; type=entry
{
"subject": "Task 3 in batch",
"regardingobjectid_account_task@odata.bind": "accounts(00000000-0000-0000-0000-000000000001)"
}
--batch_80dd1615-2a10-428a-bb6f-0e559792721f
Content-Type: application/http
Content-Transfer-Encoding: binary
GET /api/data/v9.2/accounts(00000000-0000-0000-0000-000000000001)/Account_Tasks?$select=subject HTTP/1.1
--batch_80dd1615-2a10-428a-bb6f-0e559792721f--
Solved! Go to Solution.
โ10-25-2023 01:34 PM
A custom connector would definitely get the job done... but would it work to use multiple custom actions in a row? Or perhaps the Ruby/Python connector (I haven't used those much).
โ10-30-2023 07:50 AM
Hi @ryan-avent ,
On the custom action in Microsoft Dynamics, have you tried using a Raw response and adding the Content-Type on the Request Header? I can't see any similar use case, but I have tried this using a multipart form for GDrive, and it worked.
If it doesn't work; you can try using HTTP or SDK connector.
โ10-25-2023 01:34 PM
A custom connector would definitely get the job done... but would it work to use multiple custom actions in a row? Or perhaps the Ruby/Python connector (I haven't used those much).
โ10-30-2023 07:50 AM
Hi @ryan-avent ,
On the custom action in Microsoft Dynamics, have you tried using a Raw response and adding the Content-Type on the Request Header? I can't see any similar use case, but I have tried this using a multipart form for GDrive, and it worked.
If it doesn't work; you can try using HTTP or SDK connector.