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
722 stars 242 forks source link

Adding a new fieldgorup in base table #4538

Closed carlosyuwono closed 5 years ago

carlosyuwono commented 5 years ago

When trying to add brick fieldgroup to a base table that does not have an existing fieldgroup, the compiler is throwing an error "The FieldGroup 'Brick' is not found in the target."

When testing an a table with an default brick field group ie. customer table , I am not getting the error.

Here is my code

tableextension 50001 "MyItemCrossReference" extends "Item Cross Reference" { fieldgroups {

    addlast(Brick; "Cross-Reference No.")
    {
    }
}

}

AndreyKorepanov commented 5 years ago

Hi @carlosyuwono, thank you for reporting the issue. In a table extension object the addlast keyword is used to add new fields to the existing fieldgroup, defined for the table object. It is not possible to create new field group in a table extension object. For more information regarding fieldgroups please refer the doc: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-field-groups

carlosyuwono commented 5 years ago

will this feature be added on the future release ?

AndreyKorepanov commented 5 years ago

@carlosyuwono, I do not think so, this feature is not on our task pool.

RedFoxUA commented 5 years ago

AndreyKorepanov, about "It is not possible to create new field group in a table extension object." - I open the link which you sent and can read "A field group in table or table extension objects defines the fields to display in a drop-down control on pages that use the table and fields that display when these pages are shown in the tile view."

  1. based on the information from this page I wrote:

    tableextension 23071641 "PaymentMethodExt" extends "Payment Method"
    {
    fields
    {
        field(23071641; "Export Payment Method"; Code[10]) { }
    }
    
    fieldgroups
    {
        fieldgroup(Dropdown; "Export Payment Method") { }
        addlast(Brick; "Export Payment Method") { }
    }
    }

and VSC shows me the error in line "fieldgroups": "Syntax error, '}' expected [AL0104] (13,5)"

  1. I delete the line "fieldgroup(Dropdown; "Export Payment Method") {}" and we have 1 line with "addlast(Brick; "Export Payment Method") {} " only, but an error the same. And again, based on info from page I just want to extend current fieldgroup Brick (not add, but extend), which you can see for table "Payment Method". But I received an error "The FieldGroup 'Brick' is not found in the target." additionally!
    • 1 more line with long list of objects+[AL0198] (13,5)"

Example from "your page":

tableextension 50100 CustomerExercise extends Customer
{
    fields
    {
        field(50100); "V02Max"; Decimal) { }
    }

    fieldgroups
    {
        addlast(DropDown; V02Max) { }
    }
}

### what is wrong with either my code, or VSC or MS Doc?

RedFoxUA commented 5 years ago

I do not think so, this feature is not on our task pool.

Could you explain the point - is the functionality which we can read on official MS pages is "out of scope"? May be your team do not want to fix this REAL BUG?

JeremyVyska commented 5 years ago

Tagging issue #4393 In this, as they're related. Either would be a solution.

AbsolutelyFreeWeb commented 5 years ago

@AndreyKorepanov why is this ticket closed? we need this. How do we re-open this ticket please ?

It's not even an enhancement. this is something that was possible before, so it is a bug/lack of basic functionality.

miljance commented 4 years ago

@AndreyKorepanov why is this ticket closed? we need this. How do we re-open this ticket please ?

It's not even an enhancement. this is something that was possible before, so it is a bug/lack of basic functionality.

We also need this. There are a lot of tables even in the Base App that do not have the FieldGroup.

ghost commented 4 years ago

HI I agree this should be available to create new FieldGroups in AL extensions. When can we expect it?

eric-silverw-com commented 4 years ago

Just spent 15 minutes setting up a page/lookup combination to get around what should have been a 2 minute mod.