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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Table connection for table type CRM must be registered using RegisterTableConnection

(4) ShareShare
ReportReport
Posted on by 36
I am getting error when trying to use CRM Table from sales 365 to Business Central and modify or update in Sales 365 (CRM) using Custom Business Central API.
 
Exemple :
 
Error: "Table connection for table type CRM must be registered using RegisterTableConnection or cmdlet New-NAVTableConnection before it can be used"
 
procedure LookupCRMProduct(var CRMName: Text[250]): guid
var
    CRMProduct: Record "CRM Product";
begin
    CRMProduct.SetRange("Name", CRMName);
    if CRMProduct.FindFirst() then
        exit(CRMProduct.SystemId);
    exit('');
end;
I have the same question (1)
  • Verified answer
    YUN ZHU Profile Picture
    99,084 Super User 2026 Season 1 on at
    I also encountered this strange problem, but then I solved it after adding the following line of code.
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • Imran K Profile Picture
    29 on at
    As YuN ZHU has suggested for some reason this is usually resolved by checking the connection :
     
    CRMIntegrationManagement.IsCDSIntegrationEnabled()
  • Gerardo Rentería García Profile Picture
    25,555 Most Valuable Professional on at

    Hi, good day
    I hope this can help you, and give you some hints.

    Troubleshooting Synchronization Errors - Business Central | Microsoft Learn

    Error Message When Trying to Access Integration Tables

    Best Regards
    Gerardo

  • Suggested answer
    Alexander Drogin Profile Picture
    262 on at
    If you want to access a CRM table directly from your code, rather than using the Business Central's Dataverse connector, you need to add some boilerplate code. In particular, any virtual CRM table that you want to use in BC, must be initialized by calling RegisterTableConnection.
     
    Look at the codeunit 5340 "CRM Integration Table Synch." to find an example of this initialization. OnRun trigger in this codeunit invokes the function InitConnection to set up the connection. This call ends in the table 5330 "CRM Connection Setup". You can follow the same logic and use one of the functions RegisterConnection or RegisterConnectionWithName from this table, or call Database.RegisterTableConnection directly.
     
     
  • Gaetan Hamel Profile Picture
    36 on at
    Thank you everyone. :)
     
    Yun Zhu answer dit the trick.
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,128 Super User 2026 Season 1 on at

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans