Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
Creating Task - Script
Hi,
I am trying to run a script after an invoice is created that, based on a field be ing checked or not, creates a task due in 30 days..... However I keep getting this error:
Error: INVALID_REF_KEY
Invalid reference key [null].
Stack Trace....
Any help would be greatly appreciated... I'm not sure what's going on...
function FollowUp()
{
if (nlapiGetFieldValue('custbody_check_box') == 'F')
{
var dDate = nlapiGetFieldValue('startdate') + 30;
var sRep = nlapiGetFieldValue('salesrep');
var cID = nlapiGetFieldValue('entity');
var tID = nlapiGetFieldValue('tranid');
var recordCreated = nlapiCreateRecord('task');
recordCreated.setFieldValue('title', 'Follow-up Required' );
recordCreated.setFieldValue('assigned', sRep);
recordCreated.setFieldValue('company', cID);
recordCreated.setFieldValue('duedate', dDate);