It was too easy to simply hard code shipping methods until I found the illusive getSelectValue() method.
In the UI: Lists >> Accounting >> Shipping Items
In code:
Here is the code if you want to paste it into your project.
Dictionary<string, long> ship_methods;
ship_methods = GetShipMethods(service);
public static Dictionary<string, long> GetShipMethods(NetSuiteService service)
{
Dictionary<string, long> shipMethods = new Dictionary<string, long>();
service.tokenPassport = NSExtensions.TBAtoken.createTokenPassport();
GetSelectValueResult result =
service.getSelectValue(
new GetSelectValueFieldDescription()
{
field = “shipmethod”
,
recordType = RecordType.salesOrder
,
recordTypeSpecified = true
}
, 0
);
if (result.status.isSuccess)
{
foreach (RecordRef record in result.baseRefList)
{
string name = record.name;
string internalId = record.internalId;
shipMethods.Add(name, Convert.ToInt32(internalId));
}
}
return shipMethods;
}