Filter data in Grid

Posted on 2009-04-24
Last Modified: 2012-05-06
Hi all,

I am using Microsoft Dynamics AX 4.0 and what i would like to do is to filter the records shown in a Grid on my Form. The data shown in the Grid is from the table SalesParmTable. It displays fields ParmId, TransDate and DlvMode.

I only want the records where Ordering = 'Picking list' and   SalesId = the SalesId that is selected by the user.

I have tried to write a query (in the textChange method of the field where the user selects the SalesId) to set as the datasource of the grid but i couldn't get it to work.

I am quite the beginner when it comes to programming in X++ so describing every step would be much appreciated.

Thanks in advance
Question by:M3mph15
    LVL 7

    Expert Comment

    Do you use the salesEditLine form, or a custom one?
    LVL 7

    Accepted Solution

    Try to override the modified method of the salesId field on the form.
    This code assumes you the name of your datasource is 'salesParmTable'.
    public boolean modified()
        boolean ret;
        ret = super();
            salesParmTable_ds.filter(fieldNum(salesParmTable, SalesId), this.text());
        return ret;

    Open in new window

    LVL 6

    Author Comment

    Thankyou quale-kaizen. Your solution worked perfectly.
    LVL 6

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    This is a walkthrough guide I wrote whilst upgrading my on-premise MS Dynamics CRM 3.0 deployment to 4.0. This covers the actual installation of the product to a working level for my system, I ran into a lot of issues that the steps below fixed so h…
    On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now