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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Update a table field based on an update in another table

(0) ShareShare
ReportReport
Posted on by 618

Hi Experts,

I know there are many threads related to this subject,but still I am little confused.

I have two Tables, Table1 and Table2 and a common field named fieldA in both tables. When ever FieldA is changed / modified in any of the table the same field in the other table should also get updated. the update should occur once the changed record is saved. the relation between two tables can be recId. 

What is the best approach to this  requirement, what are the methods to be modified and where (Table level or form level) ?

Thanks in advance.  

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Update a table field based on an update in another table

    It sounds a bit strange that a business requirement contains definition of your database schema. That doesn't sound like a business requirement, it sounds like a technical design that someone made from some business requirement.

    Could you share the actual business requirement?

    Do you know that you can show data from both tables in same form / grid? So if your grid includes data from Table2, you can join Table1 as a data source, and show Table1.FieldA in your grid.

    Anyway, if you still want to maintain this data two times in your database, you need to hook into some methods / events.

    At least Table1.update(). This way you can catch all scenarios where Table1.FieldA is changed, and update related Table2 records.

  • D365  beginner Profile Picture
    618 on at
    RE: Update a table field based on an update in another table

    Hi Nikolaos,

    Thanks for the reply, It is a business requirement, both are customized tables so it wont affect anywhere.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Update a table field based on an update in another table

    The first thing to consider is: why do you need fieldA in Table2? If it must always show the same value then fieldA in Table1, why do you need it in Table2 in the first place? Normally you should not need to replicate such data in a relational database.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,257

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 913 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 611 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans