Friday, July 2, 2010

Overwrite System Field in a Table

The code below work ony at Server Side !


 
Static Server void Run()
{
    CustTable   custTable;
    ;


    ttsbegin;

    new OverwriteSystemFieldsPermission().assert();

    custTable.clear();
    custTable.AccountNum = "TEST";
    custTable.overwriteSystemfields(true);
    custTable.(fieldNum(custTable, CreatedDateTime)) = DateTimeUtil::newDateTime(01\11\2013,0);
    custTable.insert();
    
    CodeAccessPermission::revertAssert();
   
    ttscommit;
}



Enjoy !