In Dynamics 365 Business Central, an Integration Table is a specialized table used to facilitate the exchange of data between Business Central and external systems or services. These tables are often used in integration scenarios, such as connecting with Dynamics 365 Sales (CRM), Power Platform, or other third-party applications.
I clicked the Create AL Project button
I updated the project name
I entered DataverseIntegration
I selected the most recent platform
I selected the Microsoft cloud sandbox option
I clicked the Copy & Open button
I pasted the code
I selected Al: Download symbols
Symbols were downloaded
Initially the Develop Power Platform Environment was configured to access the Production Business Central Environment
The Business Central AL project was configured to deploy to the Sandbox environment
I clicked the Start Debugging menu option
The AL code paused when the line 13 breakpoint was hit
I clicked continue and the message was displayed
I deleted the HelloWorld.al file
I navigated to the Azure portal to copy the Application (Client) Id
I navigated to an app running the Power Platform to copy the https://XXX.crm.dynamics.com url
I ran the The AL Table Proxy Generator tool (altpgen.exe) to generate 6 files. AccountExt.al, ContactExt.al, Customer Order Line.al, Customer Order.al, TeamExt.al and UserExt.al
I updated the object number in the generated AccountExt.al, Customer Order.al, TeamExt.al and UserExt.al files
I ran the New AL File Wizard
I selected the Page option
I entered list page details. I clicked the Next button
I selected 5 fields
I deployed the AL code
I clicked the magnifying glass menu item and entered Customer Orders
An error was generated
Table connection for table type CRM must be registered using RegisterTableConnection or cmdlet New-NAVTableConnection before it can be used.
I added an OnInit() trigger
I navigated to the Customer Orders page again and received an error
I ran the Dataverse Connection Setup wizard
I accepted the conditions and clicked the Next button
I selected the Develop Power Platform Environment
I clicked the Next button
I clicked the Next button
I clicked the Next button
I clicked the Finish button
I clicked the Yes button
I clicked the magnifying glass menu item and entered Customer Orders
I received an error message. Business Central was unable to access the Dataverse Customer Orders table
I reviewed the roles that the Business Central Integration Business Central t... application user had been assigned to
I updated the Business Central Dataverse Integration role
I selected the Customer Order table
I clicked the Permission Settings option
I selected Full Access and clicked the Save button
I selected the Customer Order Line table and clicked the Permission Settings option
I selected Full Access and clicked the Save button
Any member of this role will now be able to access the Customer Order and Customer Order Line tables
I selected the Customer Orders page
The Dataverse Customer Orders were displayed
I ran the New AL File Wizard again
I selected the Table Extension option
I wanted to create a Customer Order Extension
I added a flow field to the generated Customer Order Integration table using the Customer Order Extension file
I updated the Customer Orders page to display the Account Name flow field rather than the GUID value
The Account column displayed the Account name
I updated the Customer Orders page to disable Insert, Modify and Delete and to enable RefreshOnActivate
I ran the New AL File Wizard
I ran the New AL File Wizard to create a Card page
I selected the fields I wanted to display
I added an OnDrillDown() trigger to the Customer Order's Name field
Pag50100.CustomerOrders.al
I clicked on a Customer Order
The Customer Order Card was displayed
I added a DataCaptionFields value to the Customer Order (Extension)
Tab-Ext50105.CustomerOrderExt.al
I reviewed the updated Card page
I added entity dyn365bc_Item_v2_0. I need to add this entity to ensure that the hadd_Item field is added to the generated Customer Order Lines Integration table.
I updated the object number
I added a Customer Order Lines ListPart
I added Name, Item (GUID) and Quantity fields to the ListPart
Notice that hadd_Item is a GUID
I added the ListPart to the Customer Order Card
The Customer Order Line details are displayed
I updated the Customer Order Lines ListPart to lookup Item details. I was able to use the hadd_Item GUID to lookup records in the Business Central Item table.
Pag50102.CustomerOrderLines.al
Item details and a calculated Amount value are displayed
I added a GetTotalAmount() procedure
The Total Amount field was displayed on the Customer Order Card
Pag50101.CustomerOrder.al