// Prepare records to compare
PurchLine origLine;
PurchLine modifiedLine;
select firstonly origLine;
modifiedLine.data(origLine);
modifiedLine.PurchQty += 1;
modifiedLine.Name += " updated";
// Compare records
var comparer = VersioningCompareRecordVersions::newTableId(tableNum(PurchLine));
container changes = comparer.packChangedFields(VersioningChangeType::Updated, origLine, modifiedLine);
// Show modified fields
for (int i = 1; i <= conLen(changes); i++)
{
container changedField = conpeek(changes, i);
FieldId fieldId = conpeek(changedField, VersioningCompareRecordVersions::posRelatedFieldId());
info(fieldId2name(tableNum(PurchLine), fieldId));
}