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 do I create and link an editable field to two tables using Events

(0) ShareShare
ReportReport
Posted on by 30
Hello,
I've created a table and a page for my field and I've extended the Customer table and Sales Header.
Basically, I want to create a new field in the customer table, card, and list. This field needs to appear also in the Sales Invoice under the customer's name.
The idea here is that if I change the field value in the Sales Invoice page, the value is automatically changed in Customer.
In order to achieve that, I need to use Events.
This is where it gets tough for me, the field needs to be editable so it can't be of class FlowField. However, the value cannot be fetched
from Customer if the field isn't Flowfield (through CalcForm).

I'm completely lost as to how to link the field and make it editable.
(Note: I'm using AL to write my code.)
How do I solve this issue?
I have the same question (0)
  • Suggested answer
    Akshay_Panchal Profile Picture
    402 on at

    Hii,

    You can write your code under the OnafterValidateEvent of your customized field.

    Thanks.

    Verify, If this answer is helpful to you.

  • Something Profile Picture
    30 on at

    Hello. I appreciate your reply.

    Can you please elaborate on how would that look like in code? I'm new to development, and I'd appreciate an example. (For example, if I create an event subscriber where do I call it from?)

    Thank you!

  • Suggested answer
    JAngle Profile Picture
    131 on at

    Example here with code snippets: docs.microsoft.com/.../devenv-events-example

    Event subscribers are triggered by the event itself. For example OnAfterValidate of a field. Once the standard table OnValidate code has run an event subscribers would be called

  • Something Profile Picture
    30 on at

    Thank you for your help. My question is, do I use that example to get the user's input because otherwise, the value from my custom field list isn't showing on the customer card. It just remains empty

  • Suggested answer
    YUN ZHU Profile Picture
    95,309 Super User 2025 Season 2 on at

    Hi, a simple example, hope this will help. (This is not the only way)

    Add field:

    pastedimage1636678189621v1.png

    Add logic:

    pastedimage1636678208779v2.png

    Thanks.

    ZHU

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

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,476 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,435 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans