✏️ Explanatory Question
In this answer we will see the code to know the record count after set based update operation.
For demo purpose, created a runnable class "CG_UpdateRecordSetRecordCount" and used the below code to update the field "classification group" of customers based on customer group.
class CG_UpdateRecordSetRecordCount
{
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
CustTable custTable;
ttsbegin;
update_recordset custTable
setting CustClassificationId = "01"
where custTable.CustGroup == "30";
ttscommit;
Info(strfmt("%1 records are updated", custTable.RowCount()));
}
}