1. Open a Script Editor and enter the following and save as SetExpectedClose.js:
var pageInit = function(){
var daysFromNow = 30; // change to how many days from now according to your preference
nlapiSetFieldValue('expectedclosedate', nlapiDateToString(nlapiAddDays(nlapiStringToDate(nlapiGetFieldValue('expectedclosedate')), daysFromNow)));
}
2. Upload Script to NetSuite's File Cabinet
3. Create SuiteScript Record. Customization > Scripting > Scripts > New > Client
4. Enter Descriptive Name
-- Scripts > Script File: SetExpectedClose.js
-- Scripts > Page Init Function: pageInit
-- Scripts > Deployments
-- Applies To: Opportunity, Deployed: Yes, Status: Released
5. Save SuiteScript Record
No comments:
Post a Comment