Deluge Error Code 1002 - "Resource does not exist."
I am using the following script in a Custom Button on a Sales Return.
Basically, the function takes the information in the sales return (plus the arguments that are entered by the user when the button is pushed) and creates a return shipping label via the Easypost API. This part works perfectly.
I then want to take information returned and update custom fields in the Sales Return, which is not working and giving the error in the title (1002 - Resource does not exist).
- //Update Sales Retrun object with label info via API
- id = salesreturn.get("salesorder_id");
- pop_lab_data = invokeurl
- [
- url :"https://www.zohoapis.com/inventory/v1/salesreturns/" + id + "?organization_id=" + organization.get("organization_id")
- type :PUT
- parameters:dataMap.tostring()
- connection:"zom2"
- ];
- info pop_lab_data;
- //
It's not obvious if the resource in question is the Sales Return or one of the custom fields being updated. Neither of those seem to be true as far as I can tell.
Any thoughts on how to solve this problem?
Here is the output after running the function (the info of the map data + error code)