I'm trying to list Ship Items (UPS, FedEx, etc..) via API. As it shows in Accounting > Shipping Items > List.
The documentation for the ItemFulfillment Record suggests that I use the operation GetSelectValue to list the shipMethod possible values (same as Ship Items).
The documentation for GetSelectValue (page 125) describes the SOAP request I need to use:
<env:Body>
<platformMsgs:getSelectValue>
<fieldName fieldType="sales_salesOrder_shipMethod"/>
</platformMsgs:getSelectValue>
</env:Body>
But it's not working, it seems that the fieldType is wrong.
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: fieldType not found on {urn:core_2013_2.platform.webservices.netsuite.com}GetSelectValueFieldDescription</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">partners-java10005.bos.netledger.com</ns1:hostname>
</detail>
</soapenv:Fault>
Where can I find the correct fieldType to get a list of the Ship Items?
Thanks to this post, I was able to come up with a C# solution.
var methods = new Hashtable();
var shipMethodFieldDesc = new GetSelectValueFieldDescription()
{
field = "shipmethod",
recordType = RecordType.estimate,
recordTypeSpecified = true
};
// make connection.
var result = connection.Service.getSelectValue(shipMethodFieldDesc, 0);
if (result.status.isSuccess)
{
for (var i = 0; i < result.totalRecords; i++)
{
// cast to RecordRef
var itemRef = (RecordRef)result.baseRefList[i];
methods.Add(itemRef.internalId, itemRef.name);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With