RE: How to setValue status custom transaction (type basic) in suiteScript ?

Hi There,
I have custom transaction type basic and use standard status at tab statuses with show status field is set checked.
Then I declare any status like Draft, Open and Completed.

I have some condition using suitescript to make different status, as usual I will load that custom transaction then setValue the status field. but unfortunately the status not changed

            var recordSPBP = record.load({
                type: 'customtransaction_spbp',
                id: id_spbp,
                isDynamic: true
            recordSPBP.setValue('custbody_spbp_related_statistical', id_statistical);
            // I am trying make sure status field id is current using 'status'
            var status = recordSPBP.getValue('status');
// I have the status value with value is 'Draft' as string
            log.debug('status '+typeof status, status);
// Already try between setText or setValue, but the status not changed
            // recordSPBP.setText('status', 'Completed');
            recordSPBP.setValue('status', 'Completed');
rianluthfi Rookie Asked on March 8, 2023 in SuiteScript.
Add Comment
3 Answers

If I reference to SuiteAnswer 42031, the only way to change status on Custom Transaction is using workflow, and maybe can use action workflow script

Rookie Answered on March 8, 2023.
Add Comment

Your Answer

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