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)

caller refresh form

(0) ShareShare
ReportReport
Posted on by 2

HI,

How can i refresh the caller form without using f5. i've already use refresh caller() but it doesnt work. It'll be great if someone guide me through example which works

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Agha SirajulDola Profile Picture
    555 on at

    Refresh calling form data source

           FormDataSource          fds;

           _CallerTable = element.args().record();

           if (_CallerTable .isFormDataSource())

           {

               fds = _CallerTable.dataSource();

               if (fds)

               {

                   fds.executeQuery();

               }

           }

    Regards,

    Agha

  • Hariharans87 Profile Picture
    3 on at

    You may refer into this link axcompendium.wordpress.com/.../how-to-refresh-caller-datasource

    If it doesn't work, share your code here

  • Zohan Profile Picture
    2 on at

    It still doesn't work. 

    i've write the method on form level by overriding refresh caller(). 

    /* Common common;
    FormDataSource assetTable;

    common = element.args().record();
    if (common)
    {
    assetTable = common.dataSource();
    if (assetTable)
    {
    // Referenced datasources must be reread before calling research as data has been modified behind the scenes
    // without calling research will fail to position selection correctly
    assetTable.reread();
    assetTable.rereadReferenceDataSources();
    assetTable.research(true);
    }
    }
    */

  • Zohan Profile Picture
    2 on at

    this still doesn't work

  • Suggested answer
    Agha SirajulDola Profile Picture
    555 on at

    Zohan,

    If u have updated/ Inserted values to table, u have to run 'ExecuteQuery' method. Have a try with it 

    Regrards,

    Agha

  • Zohan Profile Picture
    2 on at

    so i've to write refresh logic on execute query method ? that's what are you trying to say?

  • Agha SirajulDola Profile Picture
    555 on at

    as replied earlier,

          FormDataSource          fds;

          _CallerTable = element.args().record();

          if (_CallerTable .isFormDataSource())

          {

              fds = _CallerTable.dataSource();

              if (fds)

              {

                  fds.executeQuery();

              }

          }

  • Zohan Profile Picture
    2 on at

    this doesn't work as i've mentioned earlier

  • Agha SirajulDola Profile Picture
    555 on at

    Did u bugged it, does it really run excuteQuery method ?

    Otherwise thats confirm solution to it

  • Kamilabanu Profile Picture
    10 on at

    Thanks you blog helped me to fix my issue

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans