Hay Everyone,
I'm building a Power Automate flow that should automatically merge duplicate accounts in Dynamics 365.
I'm calling msdyn_SuggestPrimaryForMergeAction via PerformUnboundAction, but it always returns a 400 error.
Input:
{
"actionName": "msdyn_SuggestPrimaryForMergeAction",
"item/RecordList": [
{
"@odata.type": "Microsoft.Dynamics.CRM.account",
"accountid": "(accountid)"
},
{
"@odata.type": "Microsoft.Dynamics.CRM.account",
"accountid": "(accountid)"
}
]
}
Error response:
{
"error": {
"code": "0x80040265",
"message": "Suggest primary record plugin failed!!!"
}
}
What I've checked so far:
-
Both accounts exist and are active
-
No custom plugins registered on Merge for the Account entity (only ActivityFeeds on Case/Anfrage)
-
Plugin Trace Log shows no entry for msdyn_SuggestPrimaryForMergeAction at all, even with tracing set to "All"
-
We have Dynamics 365 Sales Enterprise licensed
Questions:
-
Is msdyn_SuggestPrimaryForMergeAction even intended for use in Power Automate flows, or is it only used internally by the Duplicate Detection UI?
-
Is there a correct way to call this action programmatically, or should I use the standard Merge action instead?
Any help appreciated! :)