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 :
Small and medium business | Business Central, N...
Suggested Answer

How to update header field after lines are posted?

(0) ShareShare
ReportReport
Posted on by 80

pastedimage1662222491246v1.png

So, I have made a custom table Capital request which has a header part and line part. I have the common field 'Status' in the line part and header part. When I post the order, the status of the capital request line is updated into partially ordered status. Now, I have to update the Status in the header part. 

  • Suggested answer
    Jeffrey Bulanadi Profile Picture
    9,128 Super User 2026 Season 1 on at

    Hi Sujan,

     

    You can achieve the requirement using the below methods.

     

    You can subscribe to OnAfterValidateEvent of your Status field at your line that will update the header using the primary key once there are changes/validations.

     

    Here are the links for usage

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-subscribing-to-events

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-eventsubscriber-attribute

     

    Change the FieldClass of your Status field at the header to FlowField then declare the CalcFormula that will lookup for the value of your status field at your line.

     

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-creating-flowfields-and-flowfilters

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 728 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 545 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 328 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans