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 :
Microsoft Dynamics AX (Archived)

How to Refresh Data in Grid in Clicked method of menu button

(0) ShareShare
ReportReport
Posted on by 2,426

Good Morning,

I am using one form which is having Temporary table.

the same datasource is used in grid.

I created one button and i am deleting some records in the same table which is in form datasource.

After deletion.the record exists in grid.and i can able to see same record.if i close and open it is refreshing.

I have written InventsumTmp_ds.Research(True);  InventsumTmp_ds.Refresh(); in Clicked method of button after deleting records.

But the form is not refreshed.

Please suggest me.

Regards.

Have a great day.

*This post is locked for comments

I have the same question (0)
  • AX 2012 r3 Profile Picture
    2,426 on at

    I have tried 3 .not working

  • Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    If possible, can you share your code.

  • Verified answer
    AX 2012 r3 Profile Picture
    2,426 on at

    Hi,

    i have solved this.

    What i have done is.

    In form Init() method  it is linking physical table instance.

    So,in MenuButton Clicked() method i am calling Element.init()

    and in Form Init() i wrote after physical instance linking like 

    Form Init :-

    public void init()
    {
    super();

    PlanPendingLinesViewTmp.linkPhysicalTableInstance(PlanPendingLinesViewTmp::populatePendingLines());
    PlanPendingLinesViewTmp_ds.research(true);
    }

    then in MenuButton clicked method() after deleting records i am calling element.init() like below

    Public void Clicked()

    {

    super();

    // Select Some record from temp;

    tmp.delete();

    element.init();

    }

    Thats it.

    This might helkp someone.

    Regards.

    Have a great day.

  • Suggested answer
    Madie035 Profile Picture
    10 on at

    Just turn the auto refresh property of your button to true. It will gives you the desire results.

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Muddassir, are you sure that "Auto Refresh Data" property exists in AX 2012? I thought it was added in D365FO.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans