Hi
We are setting up a logic apps integration which has to set lookup attributes:
we do a patch to upsert a record based on an alternate key:
in the body we specify the lookup value for the parent account attribute:
in body we have: "parentaccountid@odata.bind": "/accounts(xyz_sourcekey='@{triggerBody()?['ParentId']}')"
But, we are struggling with clearing the lookup values. We have read that in order to remove the lookup value, we have to execute a delete request on the relationship: https://community.dynamics.com/crm/f/117/t/204711
For our logic app which has to update 3 different lookup attributes, it means 2 extra actions per empty lookup:
- check if the value is null
- if it is null , then execute an extra delete request
Also we have to be able to make our json body dynamic with the http action, as we only wan to include the lookup attributes if they are not empty:
we have to skip this line for example: "parentaccountid@odata.bind": "/accounts(xyz_sourcekey='@{triggerBody()?['ParentId']}')"
Do you have any other ideas on how we can solve this with a minimum of actions in LA and performance cost on Dynamics 365?
Does anyone know how to make that json body on the HTTP action in logic apps more dynamic?
Kind regards,
K
*This post is locked for comments