Search code examples
netsuitesuitescriptsuitescript2.0

When using a Restlet in SuiteScript to create a record, why is the 'createdFrom' field not being saved with the expected value?


I am utilizing the code snippet below to assign a value to the 'otherrefnum' field while creating a 'Return Authorization' record to establish a relationship with a sales order:

  returnAuthRecord.setValue({
    fieldId: "createdfrom", value: 1,
  });

However, despite setting the value using this code, the 'otherrefnum' field is not saving the expected value. What could be causing this issue?


Solution

  • I don't believe setting the created from field will source in the data from the transaction.

    Look at using record.transform