|
![]() |
#1 |
Участник
|
Насчет полей modifiedBy\modifiedTransactionId - у меня система ведет себя так :
Если обновлять поля из джоба\класса и перед обновлением запускать поиск, обновляемого курсора, как в примере ниже, то значения указанных полей просто затираются X++: static void checkSystemFieldOverWrite(Args _args) { CustTable custTable; ; ttsbegin; custTable = CustTable::find('4000', true); new OverwriteSystemfieldsPermission().assert(); custTable.overwriteSystemfields(true); //custTable.(fieldNum(CustTable, modifiedDateTime)) = DateTimeUtil::newDateTime(19\05\2012, 0); //custTable.(fieldNum(CustTable, createdDateTime)) = DateTimeUtil::newDateTime(19\05\2012, 0); custTable.(fieldNum(CustTable, modifiedBy)) = 'test'; custTable.(fieldNum(CustTable, ModifiedTransactionId)) = 444444; custTable.City = 'check'; custTable.update(); CodeAccessPermission::revertAssert(); ttscommit; info("done"); } X++: static void main(Args _args) { CustTable custTable; ; custTable = _args.record(); new OverwriteSystemfieldsPermission().assert(); custTable.overwriteSystemfields(true); //custTable.(fieldNum(CustTable, modifiedDateTime)) = DateTimeUtil::newDateTime(19\05\2012, 0); //custTable.(fieldNum(CustTable, createdDateTime)) = DateTimeUtil::newDateTime(19\05\2012, 0); custTable.(fieldNum(CustTable, modifiedBy)) = 'test'; custTable.(fieldNum(CustTable, ModifiedTransactionId)) = 444444; custTable.City = 'check'; custTable.update(); CodeAccessPermission::revertAssert(); }
__________________
Sergey Nefedov |
|
|
|