Updating fields without affecting system fields value
Public str SystemFields_OverWrite()
{
SalesTable salesTable;
;
salesTable = SalesTable::find("SO-100005",true);
ttsbegin;
new OverwriteSystemfieldsPermission().assert();
salesTable.overwriteSystemfields(true);
salesTable.SalesName = "River Hotel Test";
salesTable.(fieldnum(SalesTable,modifiedDateTime)) = salesTable.modifiedDateTime;
salesTable.doUpdate();
salesTable.overwriteSystemfields(false);
CodeAccessPermission::revertAssert();
ttscommit;
return "Success";
}
Public str SystemFields_OverWrite()
{
SalesTable salesTable;
;
salesTable = SalesTable::find("SO-100005",true);
ttsbegin;
new OverwriteSystemfieldsPermission().assert();
salesTable.overwriteSystemfields(true);
salesTable.SalesName = "River Hotel Test";
salesTable.(fieldnum(SalesTable,modifiedDateTime)) = salesTable.modifiedDateTime;
salesTable.doUpdate();
salesTable.overwriteSystemfields(false);
CodeAccessPermission::revertAssert();
ttscommit;
return "Success";
}
No comments:
Post a Comment