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

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.