I'm using NetSweet/NetSuite Ruby gem for connecting to NetSuite accounts.
Normally it's trivial to get list of shipping methods using get_select_value
. However one NetSuite account is organized into subsidiaries, and shipping methods are assigned to subsidiaries. For this particular account, get_select_value
returns empty list:
NetSuite::Records::BaseRefList.get_select_value({
recordType: "salesOrder",
field: "shipMethod",
}).base_refs.length
=> 0
This makes some sense: in new sales order form the list of shipping methods is initially empty. When I select "customer" option, NetSuite automatically fills the read-only field "subsidiary". Then list of available shipping methods is populated.
Is there a way to fetch list of shipping methods by subsidiary or for a customer?
NetSuite API response contains a warning: "Results are incomplete. You must provide a value for field entity."
Full response:
<getSelectValueResponse xmlns="urn:messages_2016_2.platform.webservices.netsuite.com">
<platformCore:getSelectValueResult xmlns:platformCore="urn:core_2016_2.platform.webservices.netsuite.com">
<platformCore:status isSuccess="true">
<platformCore:statusDetail type="WARN">
<platformCore:code>WARNING</platformCore:code>
<platformCore:message>Results are incomplete. You must provide a value for field entity.</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
<platformCore:totalRecords>0</platformCore:totalRecords>
<platformCore:totalPages>0</platformCore:totalPages>
</platformCore:getSelectValueResult>
</getSelectValueResponse>