Skip to main content

#msdyn365bc - How Do I Add Field in Table Fieldgroup?

Hi Readers,

Yesterday while reviewing a Upgrade Merge to 2020 Release Wave 2, I encountered a custom which was left during merge process.

Using Azure Develops I updated developers and the reply was that its not possible to add fields in base table filegroups. 

I thought this might be something that other developers are also following.

Please read till end. At the end of the article I have listed best practices and other things to remember regarding Field Groups.

We need to keep in Mind - 

  • As developers we need to understand that AL is constantly changing.
  • What was not possible 6 months ago may be possible Now.
  • Don't be the old NAV / GP developer that we know product Inside out.
  • Business Central Engineering team is adding features daily so think before you reply to a request.

Let's understand what are field groups and How we add fields in that?

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

Example - Customer drop-down in Sales order.


Field Group is also used to display information in Tile View of a List page and also on Mobile Client (as shown below).

Customers may like to add fields in the field group to add custom fields or base Microsoft fields based on the business requirement. 

For this demo we will add a custom field "Demo Field" in Customer Table and add that to field group.

Once field is added in Table Extension, we can also add a new area of field group.

For Changing 

  • Drop Down we will add fields that we need to anchor it to DropDown.
  • Tile View we need to anchor it to Brick.

For this example we will add custom field and also Payment ($) in DropDown and Payment ($) in Brick Field Groups.

After Publishing our changes, Drop down have two new fields.

And Tile View have one more field - Payment ($).


For a New Table you can add field group as shown below.



Things to Remember - 
  • To add field group the format is - fieldgroup(<Name>; <Field>).
  • Valid Values of Name are - DropDown and Bricks.
  • DropDown, for adding fields to the drop-down control.
  • Brick to display data as tiles.
  • The fieldgroups keyword cannot be inserted before the key control.
  • The server will remove the duplicates, if multiple extensions attempt to add the same field more than once. A field can only be added to the field group once.
  • Developer can only add field in the Last Field using Table Extension.
  • Developers cannot removed base fields from field group using Table Extension.
  • By default, the Field Group named DropDown is interpreted as Brick when a Brick definition has not been set.
  • Developer cannot extend FieldGroup if it is not defined in base table.
Hope it make sense.

Let me know your views on same.

Stay Tuned for More.

Regards,
Saurav Dhyani
www.sauravdhyani.com

Comments

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searchi...

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.