SuiteScript 1 Issue - Unable to populate Created From ID on another field

27 views Asked by At

Very new to NetSuite scripting. I am writing a very basic workflow action script to take the ID of the created from transaction (which is already referenced on the current transaction form), and then populate that ID into the new transaction ID field. But it keeps populating the words "createdFromID" instead of the actual ID.

function wf_populateField() {‌ nlapiSetFieldValue('tranid','createdFromId'); }

1

There are 1 answers

0
bknights On

if the variable createdFromId is in scope when this function is called then your function should be

function wf_populateField() {‌  nlapiSetFieldValue('tranid',createdFromId); }

note that there are no quotes around the variable name.