2016-11-09 6 views
0

ItemFulfillmentには、パッケージ情報、場合によってはSuiteTalkを使用する別の配送方法/通信業者を含めて出荷時にマークする必要がありますか?我々は最初にItemFulfillmentを作成するためにWMS Lite RF Mobile Screenを使用し、次にそれを出荷するカスタムアプリを使用します。SuiteTalkを使用したトラブルシューティング

私は最初にItemFulfillmentPackageListを使ってパッケージを指定しようとしましたが、私が指定したものを無視して、デフォルトのパッケージ(0.05 lb、説明も追跡もありません)を追加しました。

それから、ItemFulfillmentPackageUspsListなどを試してみました。注文と履行記録で以前に指定された通信事業者と一致すると、正しいパッケージ情報が表示されました。一致しない場合は、エラーが発生します。 "[Code = JS_EXCEPTION] Error:配送方法を別の運送会社に切り替えることは、運送業者の荷物の積荷フォームを再ロードする必要があるため、サポートされていません。我々はいくつかの注文については無料配送を提供しているので、キャリアを切り替える能力が必要です。これは、「主要3キャリアが提供する料金からパッケージの最も安い料金を選択する」ことになります。

//curShipment is an EasyPost shipment after purchasing postage. 
//it contains relevant information about the package 
ItemFulfillment fulfillmentUpdate = new ItemFulfillment(); 
fulfillmentUpdate.internalId = curFulfillment.internalId; 
fulfillmentUpdate.shipStatus = ItemFulfillmentShipStatus._shipped; 
fulfillmentUpdate.shipStatusSpecified = true; 
fulfillmentUpdate.shipMethod = new RecordRef() 
{ 
    // Get the internalId from a saved dictionary 
    internalId = shipMethods.GetNetsuite(curShipment.selected_rate).netsuiteId 
}; 

switch (curShipment.selected_rate.carrier) 
{ 
    case "USPS": 
     ItemFulfillmentPackageUsps pkgUsps = new ItemFulfillmentPackageUsps(); 
     pkgUsps.packageWeightUsps = curShipment.parcel.weight/16; // Easypost uses Oz, Netsuite uses Lb 
     pkgUsps.packageWeightUspsSpecified = true; 
     if (string.IsNullOrWhiteSpace(curShipment.parcel.predefined_package)) 
     { 
      pkgUsps.packageLengthUsps = (long)curShipment.parcel.length; 
      pkgUsps.packageLengthUspsSpecified = true; 
      pkgUsps.packageWidthUsps = (long)curShipment.parcel.width; 
      pkgUsps.packageWidthUspsSpecified = true; 
      pkgUsps.packageHeightUsps = (long)curShipment.parcel.height; 
     } 
     pkgUsps.packageTrackingNumberUsps = curShipment.tracking_code; 

     ItemFulfillmentPackageUspsList pkgListUsps = new ItemFulfillmentPackageUspsList(); 
     pkgListUsps.packageUsps = new ItemFulfillmentPackageUsps[] { pkgUsps }; 
     fulfillmentUpdate.packageUspsList = pkgListUsps; 
     break; 
    // Cases for the other carriers, almost identical to USPS above 
} 
SetNetsuitePrefs(); // Sets preferences and authenticates, similar to the ERP example code 
WriteResponse response = await System.Threading.Tasks.Task<SearchResult>.Run(() => { return nsService.update(fulfillmentUpdate); }); 
// Results in error: 
// [Code=JS_EXCEPTION] Error: Switching the shipping method to another carrier is an unsupported operation, because it requires reloading the item fulfillment form for that carrier. 

答えて

0

使用する出荷明細のRecordRefにshipMethodを設定してみてください。 SOにFedEx Shipping Itemを入力してUPSを使用する場合は、それに応じてshipMethodを設定し、キャリア固有のパッケージリスト構造を使用します。

+0

'getSelectValue()'の完全な 'RecordRef'を使うことを意味しますか?私は 'getSelectValue()'から得た 'internalId'を使って' shipMethod'を新しい 'RecordRef'に設定しようとしました:' fulfillmentUpdate.shipMethod = new RecordRef(){/ *保存された辞書からinternalIdを取得する*/internalId = shipMethods.GetNetsuite(curShipment.selected_rate).netsuiteId}; ' –

関連する問題