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 :
Finance | Project Operations, Human Resources, ...
Answered

Refresh on PurchTable form causes it to jump to "Lines" tab

(0) ShareShare
ReportReport
Posted on by 5

I'm currently doing a customization on the PurchTable and added a new field to it. The main functionality that I'm trying to achieve is when I modify this field, the address will change based on its financial dimensions.

I managed to do this correctly, after I change a value on the new field, the address automatically changes. I've done that by updating the record and calling "purchTable_ds.research(true)".

The problem with this is that the field I'm changing is in the "Header" tab of the form, and the call to research the datasource makes the form jump to the "Lines" tab. How can I force the refresh of the form but at the same time, maintain it in the "Header" tab?

I've also tried refresh() and reread() but don't get the expected results. For example, when using "reread()", I change the field value and the address doesn't update. However, If I save the record and try to change the field again, the address starts refreshing and saving correctly.

Anyone can help?

Thank you.

João

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Joao,

    Could you, please, share more information about your customization? What methods and fields are involved?

    Usually, if you need to update some fields based on other fields you need to use modifiedField method on table level or form level (depends on requirements), but this operation updates data on the form automatically. Research method selects data from the database directly and usually, it's needed if you don't update data on form cursor directly.

  • udaY-ch Profile Picture
    5,128 on at

    Hi,

    By default, when you open the purchtable form the line view is shown.

    Thats what happen when you call the datasource.refresh() That just switches from header view to line view.

    Did you try using element.task(#taskF5) which refresh the forms and keep the tab as header view.

    Uday

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Please try doing the following -

    purchLine_ds.rereadReferenceDataSources();

    purchLine_ds.refresh();

    You can check the code changing the Storage dimension Site as a reference. It has a functionality similar to your requirements.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans