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)

update_recordSet CIL Error

(0) ShareShare
ReportReport
Posted on by 4,079

I am having some problems with update_recordSet and CIL compilation.

In my following code, the line with the update_recordSet gives me a CIL compilation error:

CIL-generering: Error during dispatch of Expr.

private void TestUpdateSalesLine()
{
    SalesLine   salesLine;

    ttsbegin;
while select forUpdate salesLine where salesLine.SalesId == "123456" { salesLine.LineNum = -SalesLine.LineNum; salesLine.update(); } // Tried to use update_recordSet for this but got a CIL error: // CIL-generering: Error during dispatch of Expr. update_recordSet salesLine setting LineNum = -salesLine.LineNum where salesLine.SalesId == "123456";
ttscommit; }


Why do I get that error?

*This post is locked for comments

I have the same question (0)
  • Rudi Hansen Profile Picture
    4,079 on at

    But why is that a problem, when i run the code it works without problems?

    The reason I am trying to use update_recordset is that I am changing the LineNum on a lot of records, and using update_recordset runs in about 50% of the time that the while select does.

  • Suggested answer
    István Orosz Profile Picture
    2,137 on at

    Hi,

    Did you tried to stop AOS, purge the Xppil folder (C:\Program Files\Microsoft Dynamics AX\60\Server\<<name of AOS>>\bin\XppIL), delete AUC files, start AOS and do a full CIL please? Only prerequisite is to have error free X++ compile.

    Kind Regards,

    István

  • Rudi Hansen Profile Picture
    4,079 on at

    [quote user=""István"][/quote]

    Hi,

    Did you tried to stop AOS, purge the Xppil folder (C:\Program Files\Microsoft Dynamics AX\60\Server\<<name of AOS>>\bin\XppIL), delete AUC files, start AOS and do a full CIL please? Only prerequisite is to have error free X++ compile.

    Kind Regards,

    István

    I just did that and as Expected it changed nothing.

  • Rudi Hansen Profile Picture
    4,079 on at

    [quote user=""Crispin"][/quote]

    Replace the settting line as follows:

    salesLine.LineNum   = salesLine.LineNum - salesLine.LineNum - salesLine.LineNum;

    Direct Negation assignment is somehow not understood by the System.

    That actually worked :-)

    Now if only it was clear for me how to report this to MS, but since I am with a small partner I do not think I can.

  • Rudi Hansen Profile Picture
    4,079 on at

    Unfortunately we are apparently not setup correct in LCS, I am not able to create a new support request.

    I get an "Support does not support pay-per-incident support plans."

    #SmallPartnerProblems

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