Soap 获取nlobjSearchFilter包含无效的运算符,或者语法不正确:internalid。尝试添加VendorBill时

Soap 获取nlobjSearchFilter包含无效的运算符,或者语法不正确:internalid。尝试添加VendorBill时,soap,netsuite,suitetalk,Soap,Netsuite,Suitetalk,我正在将此SOAP对象发送到Netsuite添加API。我得到以下错误响应: nlobjSearchFilter包含无效运算符,或语法不正确:internalid 是否有人在添加操作中看到此错误?我也不确定为什么在我的添加操作中会出现搜索筛选器错误 object(AddRequest)#10 (1) { ["record"]=> object(VendorBill)#15 (50) { ["createdDate"]=> NULL ["lastModi

我正在将此SOAP对象发送到Netsuite添加API。我得到以下错误响应:

nlobjSearchFilter包含无效运算符,或语法不正确:internalid

是否有人在添加操作中看到此错误?我也不确定为什么在我的添加操作中会出现搜索筛选器错误

object(AddRequest)#10 (1) {
  ["record"]=>
  object(VendorBill)#15 (50) {
    ["createdDate"]=>
    NULL
    ["lastModifiedDate"]=>
    NULL
    ["nexus"]=>
    NULL
    ["subsidiaryTaxRegNum"]=>
    NULL
    ["taxRegOverride"]=>
    NULL
    ["taxDetailsOverride"]=>
    NULL
    ["customForm"]=>
    NULL
    ["billAddressList"]=>
    NULL
    ["account"]=>
    NULL
    ["entity"]=>
    object(RecordRef)#19 (4) {
      ["internalId"]=>
      string(6) "561643"
      ["externalId"]=>
      NULL
      ["type"]=>
      NULL
      ["name"]=>
      NULL
    }
    ["subsidiary"]=>
    NULL
    ["approvalStatus"]=>
    NULL
    ["nextApprover"]=>
    NULL
    ["vatRegNum"]=>
    NULL
    ["postingPeriod"]=>
    object(RecordRef)#31 (4) {
      ["internalId"]=>
      string(3) "209"
      ["externalId"]=>
      NULL
      ["type"]=>
      NULL
      ["name"]=>
      NULL
    }
    ["tranDate"]=>
    string(18) "2018-10-31T6:00:00"
    ["currencyName"]=>
    NULL
    ["billingAddress"]=>
    NULL
    ["exchangeRate"]=>
    NULL
    ["entityTaxRegNum"]=>
    NULL
    ["terms"]=>
    NULL
    ["dueDate"]=>
    NULL
    ["discountDate"]=>
    NULL
    ["tranId"]=>
    string(15) "30943011-148338"
    ["userTotal"]=>
    NULL
    ["discountAmount"]=>
    NULL
    ["taxTotal"]=>
    NULL
    ["paymentHold"]=>
    NULL
    ["memo"]=>
    string(15) "30943011-148338"
    ["tax2Total"]=>
    NULL
    ["creditLimit"]=>
    NULL
    ["availableVendorCredit"]=>
    NULL
    ["currency"]=>
    NULL
    ["class"]=>
    object(RecordRef)#28 (4) {
      ["internalId"]=>
      int(1)
      ["externalId"]=>
      NULL
      ["type"]=>
      NULL
      ["name"]=>
      NULL
    }
    ["department"]=>
    object(RecordRef)#24 (4) {
      ["internalId"]=>
      string(1) "1"
      ["externalId"]=>
      NULL
      ["type"]=>
      NULL
      ["name"]=>
      NULL
    }
    ["location"]=>
    object(RecordRef)#16 (4) {
      ["internalId"]=>
      int(2)
      ["externalId"]=>
      NULL
      ["type"]=>
      NULL
      ["name"]=>
      NULL
    }
    ["status"]=>
    NULL
    ["landedCostMethod"]=>
    NULL
    ["landedCostPerLine"]=>
    NULL
    ["transactionNumber"]=>
    NULL
    ["expenseList"]=>
    NULL
    ["accountingBookDetailList"]=>
    NULL
    ["itemList"]=>
    object(VendorBillItemList)#29 (2) {
      ["item"]=>
      array(1) {
        [0]=>
        object(VendorBillItem)#13 (36) {
          ["item"]=>
          object(RecordRef)#14 (4) {
            ["internalId"]=>
            string(2) "45"
            ["externalId"]=>
            NULL
            ["type"]=>
            NULL
            ["name"]=>
            NULL
          }
          ["vendorName"]=>
          NULL
          ["line"]=>
          NULL
          ["orderDoc"]=>
          NULL
          ["orderLine"]=>
          NULL
          ["quantity"]=>
          string(1) "1"
          ["units"]=>
          NULL
          ["inventoryDetail"]=>
          NULL
          ["description"]=>
          NULL
          ["serialNumbers"]=>
          NULL
          ["binNumbers"]=>
          NULL
          ["expirationDate"]=>
          NULL
          ["taxCode"]=>
          NULL
          ["taxRate1"]=>
          NULL
          ["taxRate2"]=>
          NULL
          ["grossAmt"]=>
          NULL
          ["tax1Amt"]=>
          NULL
          ["rate"]=>
          string(5) "26.95"
          ["amount"]=>
          NULL
          ["options"]=>
          NULL
          ["department"]=>
          NULL
          ["class"]=>
          NULL
          ["location"]=>
          NULL
          ["customer"]=>
          object(RecordRef)#35 (4) {
            ["internalId"]=>
            string(6) "655853"
            ["externalId"]=>
            NULL
            ["type"]=>
            NULL
            ["name"]=>
            NULL
          }
          ["landedCostCategory"]=>
          NULL
          ["isBillable"]=>
          NULL
          ["billVarianceStatus"]=>
          NULL
          ["billreceiptsList"]=>
          NULL
          ["amortizationSched"]=>
          NULL
          ["amortizStartDate"]=>
          NULL
          ["amortizationEndDate"]=>
          NULL
          ["amortizationResidual"]=>
          NULL
          ["taxAmount"]=>
          NULL
          ["taxDetailsReference"]=>
          NULL
          ["landedCost"]=>
          NULL
          ["customFieldList"]=>
          object(CustomFieldList)#32 (1) {
            ["customField"]=>
            array(2) {
              [0]=>
              object(LongCustomFieldRef)#30 (3) {
                ["value"]=>
                string(7) "2722217"
                ["internalId"]=>
                string(17) "custcoloriginalpo"
                ["scriptId"]=>
                NULL
              }
              [1]=>
              object(LongCustomFieldRef)#27 (3) {
                ["value"]=>
                string(1) "1"
                ["internalId"]=>
                string(21) "custcoloriginalpoline"
                ["scriptId"]=>
                NULL
              }
            }
          }
        }
      }
      ["replaceAll"]=>
      NULL
    }
    ["landedCostsList"]=>
    NULL
    ["purchaseOrderList"]=>
    NULL
    ["taxDetailsList"]=>
    NULL
    ["customFieldList"]=>
    object(CustomFieldList)#36 (1) {
      ["customField"]=>
      array(2) {
        [0]=>
        object(LongCustomFieldRef)#38 (3) {
          ["value"]=>
          string(6) "148338"
          ["internalId"]=>
          string(15) "custbodyjobs_no"
          ["scriptId"]=>
          NULL
        }
        [1]=>
        object(LongCustomFieldRef)#37 (3) {
          ["value"]=>
          string(6) "237656"
          ["internalId"]=>
          string(13) "custbody_e3id"
          ["scriptId"]=>
          NULL
        }
      }
    }
    ["internalId"]=>
    NULL
    ["externalId"]=>
    NULL
    ["nullFieldList"]=>
    NULL
  }
}

在打开NetSuite支持的票证后,我了解到nlobjSearchFilter是服务器端java脚本触发器中使用的对象。因此,问题实际上在于服务器端自定义触发器

这一行:

if (originalPOID != null)
            searchForPO = nlapiSearchRecord('purchaseorder',null, new nlobjSearchFilter('internalid', null, 'is', originalPOID));
需要这样一个更安全的检查:

if (originalPOID != '' && originalPOID != null)
            searchForPO = nlapiSearchRecord('purchaseorder',null, new nlobjSearchFilter('internalid', null, 'is', originalPOID));