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 :
Supply chain | Supply Chain Management, Commerce
Answered

New form line init with the value from form header

(0) ShareShare
ReportReport
Posted on by

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
    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
    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

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 > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 298 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 183 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans