Sample COC next method in form
Song Nghia - Technical Consultant
[ExtensionOf(formstr(AssetTransfer))] final class LAW_AssetTransferForm_Extension { void init() { next init(); LAW_TransferLocationTmp tmp; delete_from tmp where tmp.CreatedBy == curUserId(); AssetTable assetTable = this.args().record(); tmp.clear(); tmp.AssetId = assetTable.AssetId; tmp.fromLocation = assetTable.Location; tmp.insert(); } public void closeOk() { LAW_TransferLocationTmp tmp; select tmp where tmp.CreatedBy == curUserId(); if(tmp.ToLocation == '') { throw Error('Field To location must be filled in.'); } next closeOk(); //delete_from tmp // where tmp.CreatedBy == curUserId(); FormRun fr = this.args().caller(); fr.dataSource().research(true); } }