Transform Assembly Build to Assembly Unbuild Transaction
Answered
Hi Everyone,
Does anyone tried to transform an assembly build to assembly unbuild using suitescript? If yes do you have a documentation or reference for us to follow.
Thank you in advance
Best answer
You will use the N/Record module to transform the record.
Something like below.
var unbuildRecord = record.transform({ fromType: record.Type.ASSEMBLY_BUILD, fromId: scriptContext.currentRecord.id, // this will depend on the script being used toType: record.Type.ASSEMBLY_UNBUILD, isDynamic: true }); // ... Do anything necessary to the Assembly Unbuild record unbuildRecord.save();