Netsuite Restlet - inserting sales order

ε祈祈猫儿з 提交于 2021-01-28 16:46:52

问题


I'm trying to insert in sales order through suitescript and I always get an error on 'Location'. here's my request

{
 "recordtype" : "salesorder",
 "entity" : "142832",
 "location" : {
     "id":"395"
 }
}

and this is the response

{
     "error": {
        "code": "USER_ERROR",
        "message": "Please enter value(s) for: Location"
    }
}

and I tried changing the location value for example

"location" : "390"

the result would be

{
 "error": {
    "code": "INVALID_KEY_OR_REF",
    "message": "Invalid location reference key 390 for subsidiary <NULL>."
 }
}

回答1:


This error is occurring because the location is not "accessible" by the subsidiary associated with the customer. Subsidiaries are defined on the customer level, not on the sales order. You need to ensure the subsidiary chosen on the customer is contained within the subsidiary hierarchy of the location. To fix the issue you need to adjust the associated subsidiary of the location.

Here's more information on how to fix a very similar issue with items:

https://dashboard.suitesync.io/docs/resolving-errors#im-seeing-a-invalid-item-reference-key-123-for-subs



来源:https://stackoverflow.com/questions/48297799/netsuite-restlet-inserting-sales-order

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!