microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
732 stars 243 forks source link

Extending standard CRM type table #2508

Closed Linas-Tisski closed 9 months ago

Linas-Tisski commented 6 years ago

Hello,

We're working on the integration implementation between Busincess Central and Dynamics Sales. One of the requirements is to integrate custom CRM sales order field with Business Central. When we try to extend BC "CRM" table type table "CRM Salesorder", we get the following error message: "[AL] The Table "CRM Salesorder" of type CRM cannot be extended. Table "CRM Salesorder""

The sample code we're using:

tableextension 60013 CRMSalesOrderExt extends "CRM Salesorder"
{
    fields
    {
        // Add changes to table fields here
    }

    var
        myInt: Integer;
}

AL extension version no.: 0.15.18771

Thanks,

qutreson commented 6 years ago

It is currently not possible to extend CRM table as it is not supported by the server and the compiler. This is something we are considering for the future, but we don't have any time estimation for it. We will use this issue for tracking the extendability of CRM tables and keep you updated.

jigneshdhandhanav commented 5 years ago

I would like to extend CRM Account Table. I would like to add new custom field in CRM Account Table.

Is there any update ? Can we do that currently ?

charlespockert commented 5 years ago

@jigneshdhandhanav see https://github.com/Microsoft/AL/issues/3844#issuecomment-458592525

It's not ideal as it's not configurable, but it works - you could probably make this configurable by adding the right front-end and configuration tables as an extension. It's something that I've not done yet due to time constraints.

henrikwh commented 5 years ago

This is something we're looking at. We're currently looking into how we can make a more generic integration to CDS, also supporting extensibility. Overall goals is to have BC Extension support, where CDS tables can be created and consumed by extensions, and provide table extension support as well. Regarding existing sales integration, we plan to upgrade/refactor that, when we have a broader CDS support in BC. Current plan is to have v1.0 of BC CDS support by October 2019 release.

svwfr commented 5 years ago

I read from MS Docs that BC support creating new D365forSales tables. Could it be a work-around to create a table: CRMAccount2, and only add the new customized fields to that new table?? How would the mapping logic work for syncronize account to customer table, when the account-data is divided into two tables? https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-integrating-dynamics-365-for-sales-extension-development

kalberes commented 9 months ago

Please check if the new integration mechanisms answers your questions; https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/administration-custom-cds-integration