Issue Creating Vendor Bill in Dynamic Mode via Restlet

I’m trying to create a Vendor Bill in dynamic mode inside the POST method of a Restlet script.

The issue I’m experiencing is that I cannot set some fields, specifically:

  • subsidiary

  • location

  • department

  • class

Here is the error I’m getting:


{

"type": "error.SuiteScriptError",

"name": "INVALID_FLD_VALUE",

"message": "You have entered an Invalid Field Value 5 for the following field: subsidiary"

}

Code snippet:

const transactionRec = record.create({
    type: record.Type.VENDOR_BILL,
    isDynamic: true,
});

transactionRec.setValue({
    fieldId: 'entity',
    value: requestBody.body.vendor,
    ignoreFieldChange: true,
});

transactionRec.setValue({
    fieldId: 'subsidiary',
    value: requestBody.body.subsidiary,
});

transactionRec.setValue({
    fieldId: 'currency',
    value: requestBody.body.currency,
});

transactionRec.setValue({
    fieldId: 'tranid',
    value: requestBody.body.tranid,
});

transactionRec.setValue({
    fieldId: 'memo',
    value: requestBody.body.memo,
});

transactionRec.setValue({
    fieldId: 'department',
    value: requestBody.body.department,
});

transactionRec.setValue({
    fieldId: 'location',
    value: requestBody.body.location,
});

transactionRec.setValue({
    fieldId: 'class',
    value: requestBody.body.class,
});

What I’ve checked so far:

  • The role executing the script has all the required permissions.

  • The value I’m trying to set is valid (the record is active and accessible).

  • Setting the fields in the UI in the same order as the script works.

  • Using ignoreFieldChange: true in setValue() did not help.

Would really appreciate any insights, workarounds, or explanations — I might be missing something simple here. Thanks in advance!

P.S. Unfortunately, I cannot use standard mode for creating this transaction, because I need dynamic mode to set SuiteTax details on line items.

Rookie Asked on October 31, 2025 in SuiteApps.

I noticed that you have the ignoreFieldChanged set to true when setting the vendor ID. Is there a reason for that? I wouldn’t have thought that would affect something like this, but perhaps it does.

Can you confirm that the vendor in question is setup as part of Subsidiary 5? I’ve done a lot of stuff with subsidiaries and vendors, and not having the vendor/subsidiary relationship set up is somewhat common (in my experience).

on November 4, 2025.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   SuiteMigration   Become a Sponsor