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 :
Microsoft Dynamics AX (Archived)

Populate RecId of one table from RecId of another table

(0) ShareShare
ReportReport
Posted on by 4,624

Hi,

I have one New Table . I have to store recid of another table in Recid field of New table . Like this :

newTable.RecID = anotherTable.ReciD;

is it right to do ?

please suggest

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    PA-22040759-0 Profile Picture
    6,194 on at

    You should not overwrite the RecId field of your "newTable". To set up a reference to a RecId from another table, you'll need a new field for the reference RecId. The datatype for this should be RefRecId or an extension of that.

    One example from the standard application could be the ReasonRefRecId field of the CustTrans table.

  • Rohin Profile Picture
    4,624 on at

    Okay Thanks, I have create one Field of Int64 ( EDT reference to RefRecId) , but when i updated This field by recid of another field like this :

    NewTable.RefrecId = anothertable.recId;

    Then New Table has zero value for RefRecId . i don't understand why this shows 0

    Looking for your suggestion please.

    Thanks

  • Mea_ Profile Picture
    60,284 on at

    Hey Visvash Walia,

    Can you share your code or other details ? When do you do this update ?

  • Rohin Profile Picture
    4,624 on at

    Thanks ievgen & palle ,

    Now its working fine. Recid is successfully updated in NewTable using above code mentioned.

    Thanks

  • Rohin Profile Picture
    4,624 on at

    Hello ievgen,

    Sorry , Its not working well. Sometimes there is RecId in newTable and sometimes its value zero . Please suggest

    i used below code :

    code2.PNG

    code2.PNG

  • Rohin Profile Picture
    4,624 on at

    Anybody has  suggestion on this ?

    Thanks

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans