Home > Dynamics Ax > Dynamics Ax – Update the records with single query statement.

Dynamics Ax – Update the records with single query statement.


 

 

For updating the ‘N’ no. of records we can use simple query statement instead of using while loop.

(i.e. while select inventTrans where )

By using update_recordset we can update multiple records at a time.

 

oldRFQCaseId = this.orig().RFQCaseId;  

 

ttsbegin;

 

    update_recordset inventTrans

        setting TransRefId = this.RFQCaseId

            where inventTrans.TransRefId == oldRFQCaseId;

 

    ttscommit;

 

Secret telling

Advertisements
Categories: Dynamics Ax
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: