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

Updating a field when we change some value on a form in x++

(0) ShareShare
ReportReport
Posted on by 70

Hi,

I have a field named Sequence number in a table named Table A. There's another table named Table B where these two tables are linked with a relation

TableA.QualityOrderNo == TableB.QualityOrderId

TableA.SequenceNum == TableB.SequenceNum

There's a field named Result in Table B.

Now, the condition is, when I change the sequence number in Table A which has certain value linked to results in Table B, should retain its Results value whenever I change its sequence number

For example, consider a test case where I have a sequence number = 10 and this has the value in Results field as 100.

When I change its sequence number to 20, the value in the test case should retain but instead its creating a new test case without any value in the Results field.

Now, I should write the code where I can update the existing Results to the test case which has new sequence number now.

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    299,576 Super User 2025 Season 2 on at
    RE: Updating a field when we change some value on a form in x++

    Hi C4u,

    I wonder if you have the best data model or relations in this case. Have you considered having a field called RefRecId in table B which will then have a relation with and will be filled with the record ID value of table A? Then you don't need the SequenceNum in table B and you have a stable relationship.

  • C4u Profile Picture
    70 on at
    RE: Updating a field when we change some value on a form in x++

    Hi André Arnaud de Calavon,

    I have to continue with the condition I have here, I cant use another relation with RefRecId since these relations are from Standard code.

  • André Arnaud de Calavon Profile Picture
    299,576 Super User 2025 Season 2 on at
    RE: Updating a field when we change some value on a form in x++

    Hi C4u,

    If it is about standard tables, can you explain the full business scenario and exact table names?

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 1,922

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,922

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans