AX – D365FO – Using update_recordset with CrossCompany statement

If you have tried to use Update_recordset with CrossCompany option you'll probably have faced this error : "Cannot update multiple records in yourTable(yourTable).Cross company update_recordset operation should skip database logging." The reason is because you have to disable database logging before to proceed To solve this issue you must use these methods : yourTable.skipDataMethods(true); yourTable.skipDatabaseLog(true); … Continue reading AX – D365FO – Using update_recordset with CrossCompany statement

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 setting ERACommercialGroupId = comunanzaERA.SubGroupId join comunanzaERA where inventTable.ItemId == comunanzaERA.comunanzaCode && comunanzaERA.SubGroupId != ''; info(strFmt("Copy Items from Comunanza ERA Subgroup Id to … Continue reading AX – D365FO – How to count affected/updated rows in a Update_recordset statement