2
如果使用下面的代碼加載銷售訂單,我如何獲得shipcity
。請注意,如果您轉儲對象(salesOrder),您將看到有沒有shipcity
。奇怪的是,shipzip
,shipstate
和shipcountry
有自己的領域,但shipcity
不。我也試過billcity
,但無濟於事。這似乎是一個很大的脫節。該shipcity
應該說Fort Wayne
像它的UI,但2.0 API沒有返回NetSuite:從SuiteScript 2.0中的銷售訂單中獲取貨運實體
// load up a sales order from a Fort Worth customer
var salesOrder = record.load({
type: record.Type.SALES_ORDER,
id: salesOrderId,
isDynamic: true
});
// these work fine
salesOrder.getValue("shipcountry") = "US"
salesOrder.getValue("shipstate") = "IN"
salesOrder.getValue("shipzip") = "46804"
// none of the following work when it should say "Fort Wayne"
salesOrder.getValue("shipcity") = Null
salesOrder.getValue({ fieldId: "shipcity" }) = Null
salesOrder.getText("shipcity") = Null