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...
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
    159 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
    102,590 Super User 2026 Season 1 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 580 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 462 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 272 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans