Field groups in AL

brimfred
brimfred Member Posts: 14
Does anyone know how to modify field groups in a table when using AL (ext v2)?

Best Answer

Answers

  • brimfred
    brimfred Member Posts: 14
    Perfect thanks DenSter :)
  • DenSter
    DenSter Member Posts: 8,307
  • Theo_van_de_Ven
    Theo_van_de_Ven Member Posts: 22
    So I can use fieldgroups in my extension if I have a new table in my extension but I cannot use fieldgroups in my .al file that extends an existing table. Any suggestions on how to change the fields shown in a dropdownlist for an extended table?
    Theo van de Ven
    Technical Consultant | System Administrator

    Rainbow Crossmedia BV
    Bosmanskamp 63
    4191MT Geldermalsen
  • TanyaM
    TanyaM Member Posts: 3
    AL is a new development enviroment in NAV 2018. Thanks for sharing this valuable information, it was quite useful. if you wish to know more abot AL in Microsoft Dynamics NAV 2018 i would suggest you to visit this blog AL in NAV
  • julkifli33
    julkifli33 Member Posts: 1,092
    whats wrong with my code here?
    oc02wz7207lr.png

    75hsvrdg588k.png
  • dalmatinko
    dalmatinko Member Posts: 11
    Hi
    julkifli33

    please try to use it like:

    fieldgroups
    {
    addlast(DropDown; "More Descriptive Option")
    {

    }
    }

    So, you can only add last Field(s) to existing fieldgroup.


  • julkifli33
    julkifli33 Member Posts: 1,092
    AddLast cant be used in certain tables.
    in my case i am using "Item Vendor" table
    dts141bafz41.png
  • dalmatinko
    dalmatinko Member Posts: 11
    You are 100% right!
    :D
    Who need that at all?
    Let's ask someone from Microsoft, what was the BIG/bug idea?
  • dalmatinko
    dalmatinko Member Posts: 11
    Simply, they choose example with Table which comes with defined DropDown value.
    In your example Table "Item Vendor" comes without definition for DropDown.
  • julkifli33
    julkifli33 Member Posts: 1,092
    yeah... but they can use fieldgroup instead of addlast
    x18xhigy96ik.png
  • dalmatinko
    dalmatinko Member Posts: 11
    I think, you can use it only when you create brand new table.
  • julkifli33
    julkifli33 Member Posts: 1,092
    anyone, any comment?
  • faiandaripresa
    faiandaripresa Member Posts: 1
    julkifli33 wrote: »
    anyone, any comment?
    I found a solution.
    Fieldgorups must be placed after Keys declaration. If you would order in ascending or descending mode by some fileds, you need to create an additional key contains which fields would you order.
    I hope is helpfull to you