AX – D365FO – How to count affected/updated rows in a Update_recordset statement

How to know how many rows have been updated in a Update_recordset statement?

It’s simple, you can just use rowCount() method of the table after the update statement like shown below

update_recordset inventTable


           ERACommercialGroupId = comunanzaERA.SubGroupId

       join comunanzaERA

           where inventTable.ItemId == comunanzaERA.comunanzaCode

           && comunanzaERA.SubGroupId != '';

info(strFmt("Copy Items  from Comunanza ERA Subgroup Id to InventTable Commercial group Id: %1 rows affected", int2Str(inventTable.RowCount())));

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s