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

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 2,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans