Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

Filter getting removed after from refresh

Posted on by
Hi,
I am faicing issue in form filters. after the form refresh the filters are getting removed.
 
I am calling a form from another form and sending the itemid as args. then adding the filter in the new form. But after form refresh the filters are getting removed
 
 public void executeQuery()
        {
if (element.args().caller() && element.args().caller().name() == formStr(formname))
{
                inventTable = element.args().record() as InventTable;
 
                this.queryBuildDataSource().addRange(fieldNum(formName, ItemId)).value(inventTable.ItemId);
}
 super();
}
 
But the issue is that after form refresh, the filters are getting cleared. 
Any helps would be appreciated.
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 4,831 User Group Leader on at
    Filter getting removed after from refresh
    Hi,
     
    try to call the executeQuery method through init method.
    public void init() 
    { 
        super();
        this.executeQuery();
    }
    Best regards,
    Mohamed Amine MAHMOUDI

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,663 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,741 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans