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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

how to use method inside insert_recordset

(0) ShareShare
ReportReport
Posted on by 546

Hi,

i have example like bellow :

insert_recordset TmpTable (ID,Name,CurrentUserId)

select ID,Name, curUserId()

from SourceTable;

how i can use curUserId() in this statement just i need to take current user id in all records which is inserted into the temp table ,

*This post is locked for comments

I have the same question (0)
  • Vilmos Kintera Profile Picture
    46,149 on at

    You could get answers for majority of your questions using the MSDN documentation and various blogs, please rely on search engines more in the future.

    See example 3 for insert_recordset operation in the documentation:

    msdn.microsoft.com/.../aa635694.aspx

    You could assign it to a variable first.

  • Community Member Profile Picture
    on at

    You are using it all wrong. 

    If you want to extract user id from any table then acquire that field in "userId" EDT. 

    In your case, it looks like that you want to store the current user id in your table named TmpTable. In order to use curUserId(), you need to store it into some variable and then insert it.

    "insert_recordset" is a good way for bulk insertion but has a limitation that you cannot manipulate your data while insertion which in your case is necessary.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans