How to Set a Default Value for Project Preference ‘ Limit Time and Expenses to Resources ‘

/**
*@NApiVersion 2.x
*@NScriptType UserEventScript
*/

define(['N/record','N/config'],
function(record,config) {‌

function beforeLoad(scriptContext) {‌    
var projectRec = scriptContext.newRecord ;
projectRec.setValue('limittimetoassignees', false);
}

function beforeSubmit(scriptContext) {‌
var projectRec = scriptContext.newRecord ;
projectRec.setValue('limittimetoassignees', false);
}

return {‌
beforeLoad: beforeLoad,
beforeSubmit: beforeSubmit
};

});

Leave a comment

Your email address will not be published. Required fields are marked *