web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Table Relation in Dataverse integraion

(0) ShareShare
ReportReport
Posted on by 20

Hi Colleagues!
I have to syncronize Sales Header and Sales Line with Dataverse. So, I've created both tables in Dataverse.
Sales Line's Document.No column lookups to Sales Header Id.
Altpgen made me neccessary fields:
field(46;bctmsprt_SL_DocumentNo;GUID)
{
ExternalName = 'bctmsprt_sl_documentno';
ExternalType = 'Lookup';
Description = '';
Caption = 'Document No.';
TableRelation = "CDS bctmsprt_Sales".bctmsprt_SalesId;
}
field(47;bctmsprt_SL_DocumentNoName;Text[100])
{
FieldClass = FlowField;
CalcFormula = lookup("CDS bctmsprt_Sales".bctmsprt_No where(bctmsprt_SalesId=field(bctmsprt_SL_DocumentNo)));
ExternalName = 'bctmsprt_sl_documentnoname';
ExternalType = 'String';
ExternalAccess = Read;
}
It looks like good.

But I'm getting an error during Full Synchronization job:
The data could not be updated because of the following error: Document No. 102205 must be coupled to a record in Dataverse.
I have empty Table Sales Lines in DataVerse. Sales Header table in Dataverse is synchronized and coupled. Could you help me? Or might share the link with related tables synchronizing.

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

  • Hein Kruger Profile Picture
    629 on at

    Hi,

    I used  YUN ZHU's article to do the integration.

    https://yzhums.com/17065/

    You can also follow this Youtube link from  Areopa Webinars.

    www.youtube.com/watch

  • Anton Gerasimov Profile Picture
    20 on at

    Hi Marco! Thank you, I'm trying to get aboard.

  • Anton Gerasimov Profile Picture
    20 on at

    Hi Hein! Thank you for interesting materials,. But I'm already done it. My issue in having deals with related tables. How can we synchronize a couple of related tables such as Sales Header and Sales Line. Furthermore, this couple has Table relation with a pair of field: Document No and Document type. Corresponding table in Dataverse have a relation buy just one field : Document No. So i need an example with synchronizing a couple of related table.

  • Ashuq123 Profile Picture
    15 on at

    You need to delete the coupled record and re-couple the records after any modification in Dataverse Integration table.

    Related>Dataverse >Coupling>Delete Couple.

  • Anton Gerasimov Profile Picture
    20 on at

    Hi Ashug123! Thank you for advice! Could you be more specific where exactly should i click "related"? In Dataverse Connection Setup form? I have no dataverse option in "related" menu there. But I did uncoupling and coupling for both tables in Integration Table Mapping form (menu "uncoupling - Delete Couplings, then menu coupling - Match-Based Coupling). But the result is the same: Document No. 102205 must be coupled to a record in Dataverse...

  • Suggested answer
    Greg Enns Profile Picture
    1,106 on at

    In the Table Mapping, there is a checkbox called "Sync Only Coupled Records". If you want it to create new couplings, then this needs to be unchecked for the table mapping.

  • Anton Gerasimov Profile Picture
    20 on at

    Hi Greg! Of course, this option is unchecked ...

  • Ashuq123 Profile Picture
    15 on at

    if you don't see Dataverse under related  :

    pastedimage1649280350390v1.png

    Then go to Assisted Setup make sure the Dataverse Integration is setup 

    pastedimage1649280505288v2.png

  • Suggested answer
    Anton Gerasimov Profile Picture
    20 on at

    I've managed to solve the problem. The root cause is "document no" field in the Sales Lines table contains just document number not corresponding sales header record system id. The decision is creating extension of sales line table with corresponding sales header system ID field. And match this field with dv sales lines table "document no" field. It might be helpful for any related tables synchronizing.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans