Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

After the insert_recordset statement i want to fetch salestable base on sales id field but i am getting empty buffer. insert_recordset is working fine.

(0) ShareShare
ReportReport
Posted on by 105

pastedimage1660610844515v1.png

Record of temp table after running above x++ code

pastedimage1660611162479v2.png

What i want is to based on salesid field in inserted temp table, futher i want to insert line in same tmp table from sales line.

  • Martin Dráb Profile Picture
    231,925 Most Valuable Professional on at
    RE: After the insert_recordset statement i want to fetch salestable base on sales id field but i am getting empty buffer. insert_recordset is working fine.

    Maybe your code is called from another transaction - nothing is committed until the top-most transaction gets completed.

    Also, there is a way to see uncommitted data too in SQL Server (e.g. by using NOLOCK hint).

    Nevertheless the table name suggests that it's temporary. If it's InMemory temporary table, it doesn't exist in DB at all. If it's TempDB table, it can be found in TempDB database, but you would need to know the actual generated name, because there may be many instances of the same temporary table.

  • imran_balti115 Profile Picture
    105 on at
    RE: After the insert_recordset statement i want to fetch salestable base on sales id field but i am getting empty buffer. insert_recordset is working fine.

    Thanks  goshoom issue is resolved. By the way I used debugger but i was little confuse that after ttscommit statement i checked data in table through sql yet data was not inserted in table but when I continue the debugger the table is filled with record.

  • Martin Dráb Profile Picture
    231,925 Most Valuable Professional on at
    RE: After the insert_recordset statement i want to fetch salestable base on sales id field but i am getting empty buffer. insert_recordset is working fine.

    By the way, which version is it about? You selected "Microsoft Dynamics AX 2012" category, but then you also attached "d365 F&O" tag.

  • Verified answer
    Martin Dráb Profile Picture
    231,925 Most Valuable Professional on at
    RE: After the insert_recordset statement i want to fetch salestable base on sales id field but i am getting empty buffer. insert_recordset is working fine.

    Please use the debugger to find out what value you're passing to SalesTable::find(). I believe it's an empty string, because you haven't loaded any value to specialInstructionTmp variable. You used it only to set an update to database, not select fetch from database. If you want to fetch data from database, use a select statement.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,925 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans