Dynamics 365 Business Central: How to Copy Existing Customer to New Customer with Power Automate (Copy Customer)

Dynamics 365 Business Central

Hi, Readers.
Today I would like to talk about how to copy Existing Customer to New Customer with Power Automate. This is a problem I’ve seen in the Dynamics 365 Community over the last week, more details: Function to ‘Copy Customer’ (dynamics.com).
As you might know, when you add a new item, to save time, you can use the Copy Item function to copy an existing item to use as a template for a new item. For example, Copy Item on the Item List (31, List)

And in most Document pages, we can use the Copy Document function to simply copy an existing document. For example, Copy Document… on the Sales Order (42, Document) page.

However, the standard does not have this feature for customers. Of course we can consider customization, or use the standard Configuration Templates function. But it’s all a bit complicated.
PS: Business Central 2021 wave 2 (BC19): Use new templates with same flexibility as configuration templates (Customer, Vendor, Item, and Employee Templates)

So can we do it simply with Power Automate? Yes, It’s very simple.

Let’s see more details.
Because we need to perform this action in Business Central this time, choose Power Automate -> Create action based on a flow on the Customer Card page.

Then choose Create from blank. (Because there is no template for this requirement)

The page will jump to the Power Automate design page. And For a selected record (V3) trigger will be added automatically. More details: “For a selected record (V3)” trigger in Power Automate

In this post, I shared it on the previous designer and the new one is the same.

First, give the flow a name.
For example, Copy Customer (This will be displayed in the action bar)

Click New step. Search for Business Central, and click on it.

Select Get record (V3) action

Select the information of the API to be connected (Customer API). And the Row id is the System Id in the For a selected record (V3) step.

Click New step. Search for Business Central, and click on it.

Select Create record (V3) action

Select the information of the API to be connected (Customer API). And then click Show options

Pass the values of the Get record (V3) step to the newly created data.

For example,

Well that’s all. Let’s save the flow and simply test it.

Test video:

PS:
1. Please note that some fields are read-only. For example,

ErrorCode: BadRequest Control ‘balanceDue’ is read-only.

2. As of now, the standard APIs are not extensible, so if you need to copy additional fields, this will require customization. More details: Dynamics 365 Business Central: Can we extend standard APIs? – Download Standard Source Code for APIs

Very simple. Give it a try!!!😁

PS: If you also want to copy the Customer Picture, you need to add two more steps.
Get an image, file or document (V3):

Update an image, file or document (V3):

Test video:

Full video: Youtube

Create a flow in Power Automate to Copy Existing Customer to New Customer in Business Central

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL