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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Refresh Form Part

(0) ShareShare
ReportReport
Posted on by 3,029

I have created a form calle CustPromosFormPart to use as a form part in the CustTableListPage. This Form part has 4 tabs with different datasources.

I don't have a direct relation with CustTable. What I do is I refresh the querys in the CustPromosFormPart's init() and tab:PageActivated method.

The problem with this is that the query is not refreshed when I move for example to the next line in the CustTableListPage. I have to change to a different tab in the Form Part to refresh the data.

Is there any method I can use to update the data in the form part?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    304,925 Super User 2026 Season 1 on at

    Hi Ghetz,

    You can use the active (override)method on the DataSource for it.

  • Verified answer
    Ghetz Profile Picture
    3,029 on at

    I finally put my code in the ExecuteQuery() of each datasource in the form part. This method is called everytime the customer is changed in this example.

  • André Arnaud de Calavon Profile Picture
    304,925 Super User 2026 Season 1 on at

    Hi Ghetz,

    Thanks for your feedback on your solution. Can you verify your own answer? Then the thread will be marked as answered.

    I do understand what you have done now. My suggestion was with the assumption it was done on the base form which can call an update on the fact box.

  • Community Member Profile Picture
    on at

    Could you explain further how you were able to update the form part with each selection change in the listpage?

  • Ghetz Profile Picture
    3,029 on at

    Just override the executeQuery() method in the form part's datasource. You need to construct your "_query" variable:

    public void executeQuery()
    {
        Query                        query;
        QueryBuildDataSource         QBDS;
        QueryBuildRange              QBR;  
    
        query = new Query();
    
        QBDS = query.addDataSource(tablenum(MyFormPartTable));
       
        QBR = QBDS.addRange(fieldNum(MyFormPartTable,CustVendAc));
        QBR.value(queryValue(_CustVendTable.AccountNum)); //here you filter
    
        MyFormPartTable_ds.query(_query);
        super();
    }
  • Martin Dráb Profile Picture
    239,519 Most Valuable Professional on at

    I probably don't understand your problem, nevertheless if you want to explicitly refresh a form part from the main form, you can use the approach I've explained in Refreshing form parts.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 44

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans