Skip to main content
Post a question

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Table connection for table type CRM must be registered using RegisterTableConnection

Like (5) ShareShare
ReportReport
Posted on 30 Jan 2025 21:48:58 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;
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 8,772 Super User 2025 Season 1 on 01 Feb 2025 at 06:37:36
  • Gaetan Hamel Profile Picture
    Gaetan Hamel 36 on 31 Jan 2025 at 13:48:14
    Table connection for table type CRM must be registered using RegisterTableConnection
    Thank you everyone. :)
     
    Yun Zhu answer dit the trick.
     
  • Suggested answer
    Alexander Drogin Profile Picture
    Alexander Drogin 256 on 31 Jan 2025 at 12:21:28
    Table connection for table type CRM must be registered using RegisterTableConnection
    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.
     
     
  • gdrenteria Profile Picture
    gdrenteria 14,483 Most Valuable Professional on 31 Jan 2025 at 08:28:19
    Table connection for table type CRM must be registered using RegisterTableConnection

    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

  • Imran K Profile Picture
    Imran K 29 on 31 Jan 2025 at 03:51:13
    Table connection for table type CRM must be registered using RegisterTableConnection
    As YuN ZHU has suggested for some reason this is usually resolved by checking the connection :
     
    CRMIntegrationManagement.IsCDSIntegrationEnabled()
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 77,867 Super User 2025 Season 1 on 30 Jan 2025 at 23:13:51
    Table connection for table type CRM must be registered using RegisterTableConnection
    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

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 Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,479 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,295 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading complete