Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Coupling records between Dynamics 365 Sales and Business Central

(0) ShareShare
ReportReport
Posted on by 50

Hi,

I would like to understand technically how coupling works between BC and D365.

Background:
- Part of the scenario came from the a data migration strategy that we are currently working.
- We are migrating data from NAV to BC and CRM (onpremisse) to D365 (online).
- CDS Integration will also be activated.
- We are using SSIS + Kingswaysoft for this purpose.

Here is scenario:
Once the data migration takes place and, lets say the CDS Integration is activated but running only runs manually, how the related records between BC and D365 will be coupled?

- Would the matching records be coupled automatically? If not, what should I do additionaly?
- Is there any table or entity that defines the coupling relationship?
- Is there a specifc Key or Field that is used to couple the records?


Regards
Andre

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Coupling records between Dynamics 365 Sales and Business Central

    Thank you for confirmation that the issue is resolved plus the final answer.

  • Verified answer
    andrevagil Profile Picture
    50 on at
    RE: Coupling records between Dynamics 365 Sales and Business Central

    Hi all,

    I finally found a solution to this.

    The following article describes exactly what I was looking for.

    Basically, it guides you to create the connection between the records.

    community.dynamics.com/.../870926

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Coupling records between Dynamics 365 Sales and Business Central

    What I suggested on that webcast for mapping an external entity like CRM to a D365BC entity was to use the new systemId field.

    If you're using APIs, as standard the SystemId is assigned to a D365BC entity on every record creation, so if you're passing a systemID = X from an external aplication, the generated record on D365BC will not have X as SystemId but another newly generated value.

    The trick to avoid this is to handle the OnInsertRecord trigger in the API page as follows:

    page 50108 "Customer Entity_SD"

    {

       PageType = API;

       SourceTable = Customer;

       APIPublisher = 'sd';

       APIGroup = 'custom';

       APIVersion = 'v1.0';

       EntityName = 'customer';

       EntitySetName = 'customers';

       DelayedInsert = true;

       Caption = 'CustomerEntitySD';

       layout

       {

           area(content)

           {

               repeater(General)

               {

                   field(no; "No.")

                   {

                       Caption = 'no';

                       ApplicationArea = All;

                   }

                   field(name; Name)

                   {

                       Caption = 'name';

                       ApplicationArea = All;

                   }

                   field(systemId; SystemId)

                   {

                       Caption = 'systemId';

                       ApplicationArea = All;

                       Editable = true;  //Default is not editable

                   }

               }

           }

       }

       trigger OnInsertRecord(BelowxRec: Boolean): Boolean

       begin

           exit(not Insert(true, true));

       end;

    }

    In this way if you call this API by passing the SystemId, it will not overwritten and your record will macth with the external record.

  • Suggested answer
    Renni Profile Picture
    958 on at
    RE: Coupling records between Dynamics 365 Sales and Business Central

    Hi,

    I did an implementation of this about 6months ago and I know there have been changes since then.

    You was limited to what the connector could do which is these tables and there direction set up on jobs to reoccurr at set intervals and it was manual coupling I am afraid unless they has been a changes since then

    Business Central Dynamics 365 Sales Synchronisation Direction Default Filter
    Unit of Measure Unit Group Business Central -> Dynamics 365 Sales
    Item Product Business Central -> Dynamics 365 Sales and Dynamics 365 Sales -> Business Central Sales contact filter: Product Type is Sales Inventory
    Resource Product Business Central -> Dynamics 365 Sales and Dynamics 365 Sales -> Business Central Sales contact filter: Product Type is Services
    Customer Price Group Price List Business Central -> Dynamics 365 Sales
    Sales Price Product Price List Business Central -> Dynamics 365 Sales Business Central contact filter: Sales Code is not blank, Sales Type is Customer Price Group
    Opportunity Opportunity Business Central -> Common Data Service and Dynamics 365 Sales -> Business Central
    Sales Invoice Header Invoice Business Central -> Dynamics 365 Sales
    Sales Invoice Line Invoice Product Business Central -> Dynamics 365 Sales
    Sales Order Header Sales Order Business Central -> Dynamics 365 Sales Business Central Sales Header filter: Document Type is Order, Status is Released
    Sales Order Notes Sales Order Notes Business Central -> Dynamics 365 Sales and Dynamics 365 Sales -> Business Central

    I know the new changes to bring business central to the CDS has probably improved what development can be done in this area now, we had to stick to the above.

    The main thing I have seen from being on the CDS is that the key passes to BC from D365 for sales can be made the same as previously BC did not use the same key to couple records.

    Here is a link to something I watched last week the bottom one called developing integrations with business central they touch on the key and being able to keep the same one hope this helps

    https://demiliani.com/2020/06/24/microsoft-dynamics-365-business-central-4-steps-webcasts-ended-today/amp/

    Also more useful detail here 

    docs.microsoft.com/.../admin-prepare-dynamics-365-for-sales-for-integration

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Coupling records between Dynamics 365 Sales and Business Central

    Hello,

    Job Queues can be scheduled to synch automatically. By default out of the box Synch only coupled records is activated after initial full synch. Disable that option will help to synch all records if they fall within the filter (Integration Table Mapping).

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 874

#2
YUN ZHU Profile Picture

YUN ZHU 829 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 595

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans