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

I have the same question (0)
  • Suggested answer
    Jeffrey Bulanadi Profile Picture
    8,760 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

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans