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

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Refresh on PurchTable form causes it to jump to "Lines" tab

    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.

  • udaY-ch Profile Picture
    4,643 on at
    RE: Refresh on PurchTable form causes it to jump to "Lines" tab

    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

  • Sergei Minozhenko Profile Picture
    23,091 on at
    RE: Refresh on PurchTable form causes it to jump to "Lines" tab

    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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,281 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,019 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans