RE: How to sell gift certificates using suite script?

I am currently creating sales orders using the suite script successfully. But now I want to sell gift certificates using the same script. So how can it be possible to sell gift certificates using a suite script while creating order? Please share a demo code with me if possible.

yasir Rookie Asked on June 22, 2022 in SuiteScript.
Add Comment
1 Answers
Best answer

It’s been a while and I wasn’t doing it all from script but I’m pretty sure you should be able to do this.

The fields are on the item sublist itself (as opposed to a subrecord) and you can find them in the record browser:

giftcertfrom
giftcertmessage
giftcertrecipientemail
giftcertrecipientname

Plus there’s giftcertnumber which doesn’t seem to be in the records browser.

So you set them like:

.setSublistValue({
    sublistId: 'item',
    fieldId: 'giftcertnumber',
    line: i,
    value: ...
});
Intermediate Answered on June 23, 2022.
Add Comment

Your Answer

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