Hello, Is there a way to fetch the custom form co...
# integrations
t
Hello, Is there a way to fetch the custom form configuration setup for an entity? We are trying to create Purchase Orders in NetSuite programmatically using the REST API and would like the list of fields to specify in the request based on the custom form dynamically. Things we have tried already -- 1. Used the SOAP API to get the
customform
values using the
getSelectValue
action. 2. As suggested by ChatGPT, used a SuiteLet script to create a dynamic PurchaseOrder record using the custom form and then use a combination of
record.getFields
to get the list of fields. We call the script using the API endpoint. 3. Tried querying for various tables like
custform
using SuiteQL. No luck. But we are unable to fetch the options for dropdowns, we tried the
getSelectOptions
and the script just errored out. Is this is the only way to fetch the custom form configuration or is there a better way?
b
both the getSelectValue and getSelectOptions will work for getting select options, though its not appropiate for arbitrary fields
both are affected by sourcing and filtering, so you would need to know which fields source the field you are working with and set them beforehand
t
By sourcing, do you mean that there could be an interdependency between fields? For example, a subsidiary field could dictate what values appear for a vendor field? And to get the values of vendor field, the subsidiary would already need to be set?
b
yes
t
Gotcha. Thanks!