_INF.AfterSubmit = function AfterSubmit(type) { TYPE = type; var where = 'afterSubmit'; var self = _INF; nlapiLogExecution('debug', where, 'WE IN HERE!'); var contractID = nlapiGetFieldValue('custrecord_cl_contract'); $360.log.start(where); _INF.generateUid(); if (contractID) { // Set flag so the contract-line combiner picks this up. if (type == 'edit' || type == 'create' || type == 'delete') { nlapiSubmitField('customrecord_contract', contractID, 'custrecord_c_needscombining', 'T'); } /* Only set Lost Revenue Date field values when this contract line is originally cancelled * and only if the cancellation was not triggered by certain Edition Change reasons. */ if (self.contractLineJustBecameCancelled() && !self.cancelledViaEditionChange()) { self.setLRV(); } var contractLines = _INF.contracts.getContractLines(contractID); self.setLRVForNegativeUsers(); self.calculateRevenueValue(contractID); updateNumOfUsers(contractID, contractLines); updateCurrentEdition(contractID, contractLines); } $360.log.end(where); };