I've been currently tasked to find a way to avoid human error when the Import department create Landed Costs, so I've decided to add a new module to an existing internal tool, it reads xmls files, creates a json and it is send to the corresponding web service. It works fine but it doesn't add the Purchase Receipt that I've selected. (Since LC tab adds the Receipt with a button, I'm getting the information consulting the Receipt and appending the lines to the json).
我目前的任务是找到一种方法,在导入部门创建到岸成本时避免人为错误,所以我决定向现有的内部工具添加一个新模块,它读取XMLS文件,创建一个JSON,然后将其发送到相应的Web服务。它工作得很好,但它没有添加我选择的购买收据。(由于LC选项卡添加了带有按钮的收据,因此我将获得参考收据并将行附加到json的信息)。
Here's the json I'm sending. LandedCostDetails is the part where I'm getting no results:
这是我要发送的json。LandedCostDetail是我没有得到任何结果的部分:
{
"LinkDocumento": {
"value": "document"
},
"Vendor": {
"value": "0990015325001"
},
"VendorRef": {
"value": "002001000240797"
},
"LCInfo": [
{
"Branch": {
"value": "MAIN"
},
"LandedCostCode": {
"value": "VALADVALOREM"
},
"Amount": {
"value": 106.96
}
}
],
"LandedCostDetails": [
{
"Branch":"MAIN",
"DocType":"LC",
"InventoryID": "NMCA364",
"Warehouse": "GIT",
"UOM": "UNIT",
"ReceiptQty": 1.00,
"Weight": 0.0,
"Volume": 0.0,
"ExtCost": 55000.00,
"Currency": "USD",
"AllocatedAmount": 0.0,
"POReceiptNbr": "POR007893",
"POReceiptLineNbr": 1,
"LineNbr": 1
}
]
}
I check the created Landed Cost but there's no Receipt added.
我检查了创建的到岸成本,但没有添加收据。
The link with the parameters:
带有参数的链接:
localhost/eoa/entity/EOSWS/20.200.001/LandedCost?$select=ReferenceNbr,Vendor,VendorRef,LinkDocumento,LCInfo,ReceiptsToApply&$expand=LCInfo,ReceiptsToApply
Localhost/eoa/entity/EOSWS/20.200.001/LandedCost?$select=ReferenceNbr,供应商,供应商参考,链接文档,LC信息,收款到应用&$Expand=LC信息,收款到应用
更多回答
Can you please provide the URL parameters you are using for this? Without a URL Parameter $expand=LandedCostDetails it will not add the detail.
您能提供您为此使用的URL参数吗?如果没有URL参数$Expand=LandedCostDetail,它将不会添加详细信息。
更多回答
I've edited the question to show the whole url
我已经编辑了问题以显示整个URL
Can you also share the web service endpoint in a customization project, this is not a standard Acumatica endpoint. Also it seems like you are conflating a property called "receiptstoapply" with "LandedCostDetails", you might be using the object name in the $select and $expand instead of the property name
您还可以在自定义项目中共享Web服务终结点吗?这不是标准的Acumatica终结点。此外,您似乎正在将名为“ReceiptstoApply”的属性与“LandedCostDetail”合并在一起,您可能会在$SELECT和$EXPAND中使用对象名称,而不是属性名称
我是一名优秀的程序员,十分优秀!