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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

How to get value from a filed in a page to another page?

(0) ShareShare
ReportReport
Posted on by 15

I have created a 2 new custom fields in customer table you can see the below screenshot

pastedimage1619088174336v2.png

I have also created the same fields in the sales header, now when I create a sales order with the above customer, I want to flow the data of those 2 fields to the sales order. Can you guys please help me with this?

pastedimage1619088179665v3.png

I have the same question (0)
  • Lars Lohndorf-Larsen Profile Picture
    Microsoft Employee on at

    Hello,

    You don't mention which version, but as you say that you are adding fields to an existing table, I take that this is BC14 or earler, OnPrem. If you need this for SaaS, then we need to work with extensions, and then the answer would be a bit different, but the same principle really.

    NAV / Business Central is trigger driven. Wherever possible, use Table Triggers and then your business logic will apply no matter from where you call it (from any page, from code, from Web Services, etc). So what you want here, is on table 36 "Sales Header" - trigger "Sell-to Customer No. - OnValidate()". Look for this line:

    GetCust("Sell-to Customer No.");

    After this you can assign from the Cust variable to your Sales order record, like this:

    "Customer Text" := Cust."Customer Text";

    "Customer Option" := Cust."Customer Option";

    I think this should do. It does require a develoeprs license to access triggers. If you don't have that, there is also the option to add the fields as FlowFields, so they are calculated fields on the Sales Order, that look up the values in the Customer Table, like this:

    Field properties:

    FieldClass = Flowfield

    CalcFormula = Lookup(Customer."Customer Text" WHERE (No.=FIELD(Sell-to Customer No.)))

    pastedimage1619093667106v1.png

    I hope this helps.

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

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,250 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,799 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,390

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans