web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

New form line init with the value from form header

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, all,

When I change the field (which is shared for header table and line table) in header level, and try to add a new line, the field I changed before doesn't been initialized with any value.  Only I refresh the whole form(press F5) and add a new line can initialize the value correctly .

I tried to add headerTable_ds.reread() or headerTable_ds.refresh() in lineTable_ds.initValue(), but it is useless.
Could anybody tell me how to init the correct value for the lineTable when creating?


What is the root cause for this? I mean, if I have many fields shared for header and line tables, I don't want to add the field one by one in code. Will change the mapping between two lines help or something else?

Thank you for your help.

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi Kai, Have you checked this thread

    community.dynamics.com/.../update-field-record-from-header-to-line-in-project-quotation

  • Kai Cheng Profile Picture
    Microsoft Employee on at

    Hi, Mohit, I see the link you shared, it provides me a good solution to hook the update of header table.

    I am curious that is there any better solution here?

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    How about refreshing the header datasource at modifiedField method or Write method of form Header Datasource, instead of initValue at line level. You also have to update existing lines.

  • Verified answer
    Kai Cheng Profile Picture
    Microsoft Employee on at
    Finally, I uptake a framework and add a method to refresh the lineTable from HeaderTable manually.
     
    Thanks for the help!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 1,086

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 241 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 129 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans