RE: 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
NSP17 Rookie Asked on July 11, 2022 in Manufacturing.
Add Comment
1 Answers
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();
Rookie Answered on July 11, 2022.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.