Skip to main content

Notifications

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.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,969 Super User 2025 Season 1 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?

  • C4u Profile Picture
    C4u 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
    André Arnaud de Cal... 291,969 Super User 2025 Season 1 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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans