我试图在Zoho中构建一个简单的应用程序,其中一个人输入销售订单的数据。这必须被翻译成Zoho,以及通过Zoho发送的手动订单的集成。
我已经完成了这个链接中提到的每一个步骤:https://github.com/TheWorkflowAcademy/Zoho-Books-Custom-Connections
再加上佐霍在这里说的话:https://help.zoho.com/portal/en/community/topic/integreat-03-integrating-zoho-creator-with-zoho-books
这是我的代码:
listVar = List();
//iterating each row in the subform
for each line in Items_to_Order
{
mapVar = map();
mapVar.put("item_id", line.Item_ID);
mapVar.put("name", line.Item_Name);
mapVar.put("rate", line.Price);
mapVar.put("quantity", line.Quantity);
listVar.add(mapVar);
}
values = map();
values.put("customer_id", input.Sales_Order_ID);
values.put("line_items", listVar);
response = invokeurl
[
url : "https://books.zoho.com/api/v3/salesorders?organization_id=762389459"
type :POST
parameters:mapVar
connection:"zoho_books"
detailed:true
];
// To see all headers and content
info response;发布于 2022-06-21 17:36:45
确保在地图上传递正确的值,line.Item_ID必须是图书上项目的ID,与"customer_id“相同。并检查是否有任何其他必需的参数,如"Reference_number“(如果它是否自动生成)。如果你确信所有的设置都是正确的,你能粘贴响应结果吗?
发布于 2022-07-14 12:22:48
我知道我参加聚会有点晚了,但我注意到您正在调用URL并将mapVar传递给参数。你不应该传递价值吗?
mapVar是要添加到listVar列表中的每一行项的临时映射。然后创建一个新的映射值,并将listVar作为'list_items‘添加到其中。
看起来一切都是正确的,但是当您invokeUrl时,您只传递原始的mapVar,而不是值
https://stackoverflow.com/questions/72667944
复制相似问题