web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Add Item Category Code Description to Item List Page

(0) ShareShare
ReportReport
Posted on by 29

Dear colleagues

I would like to add Item Category Code Description as a column in the Item List Page, so that Sales People can search by the name of the Item Category

I had success in doing this kind of task recently with Zhu Yun's advice here

   

However, I could not use this method to add Item Category Code Description

Any help on how to do it?

Thank you,

Louise

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    The following page extension should fix that for you.

    pageextension 50103 ItemListExt extends "Item List"
    {
        layout
        {
    
            addlast(Control1)
            {
                field(ItemCategoryName; ItemCategoryName)
                {
                    Caption = ' Item Category Description';
                    ApplicationArea = all;
                }
    
    
            }
    
    
    
        }
    
        trigger OnAfterGetRecord()
        var
            ItemCategory: record "Item Category";
    
        begin
            If ItemCategory.Get(rec."Item Category Code") then ItemCategoryName := ItemCategory.Description else ItemCategoryName := '';
    
    
        end;
    
        var
            ItemCategoryName: Text;
    }

  • Ts. Kit Wong Profile Picture
    60 on at

    Hi, you may use Inge method to add Item Category Code Description.

    Or you may add a new flowfield on Item table to get the Item Category Code Description if you have developer license.

  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, I think the link below can give you some hints, and here I provide four simple solutions. (The practice of NAV is similar to the BC.)

    More details: https://yzhums.com/22220/

    1. 

    pastedimage1662698806555v1.png

    2. 

    pastedimage1662698817345v2.png

    3. 

    pastedimage1662698830781v3.png

    4. 

    pastedimage1662698840222v4.png

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at
    [quote user="Ts. Kit Wong"]

    Hi, you may use Inge method to add Item Category Code Description.

    Or you may add a new flowfield on Item table to get the Item Category Code Description if you have developer license.

    [/quote]

    If you do it in AL you do not need a special dev license for that.

    The reason i often prefer not to use a flow field is that it can sometimes slow performance and increase the database space used. Especially in large tables that are often modified. 

    And here we always use the  primary key of the Item category table to find the description so the SQL operations for that will be very efficient and only be performed every  time you display the list and now for every modification you do to your item table.

  • Suggested answer
    Amit Baru Profile Picture
    3,037 on at

    Hi,

    Pls create one Purch. Inv. Line table and make it nature is flowfield and make connection with Item Category Table

  • Suggested answer
    Lovisa LH Profile Picture
    29 on at

    Dear Inge, Kit, Zhu and Amit

    Thank you for your suggestions.

    Since the categories were few, quite self explanatory and not long, (ie 01: Boxes, 02: Bottles), and 20 characters are allowed for Item Category Code, I decided to change the Item Category Code from numerical to alpha.

    So now the Item Cat Code is meaningful for the sales people and I did not need to add flowfields or page extensions, (although these are things that I want to learn how to do soon)

    If anyone with more experience sees an issue with this method down the road, please do say so!

    Thank you all once again

    Louise

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    Hi Lovisa LH

    To me it sounds like you chose a great approach based on your data.

    The Item Category field is a code field handling both alpha and numeric values so you should be all good with that approach.

    Just be aware that if you mix numeric values and numeric values in a code field you can get some odd sorting because the numbers will be sorted in alphabetical order and not in numerical order.

    And i do not think Microsoft will change the data type for that field so i do not see any problems here.

    Keep up to good work!

  • Verified answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, I don't see a problem with this, many setting data in the system use abbreviations, but please note that the length will be limited.

    For example,

    pastedimage1663802720884v1.png

    pastedimage1663802741598v2.png

    pastedimage1663802762058v3.png

    Hope this helps as well.

    Thanks.

    ZHU

  • Lovisa LH Profile Picture
    29 on at

    Thank you Inge for you continued helpful feedback!

  • Lovisa LH Profile Picture
    29 on at

    Thank you Zhu for your helpful and thoughtful advice!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans