Deluge Error Code 1002 - "Resource does not exist."

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).

  1. //Update Sales Retrun object with label info via API
  2. id = salesreturn.get("salesorder_id");
  3. pop_lab_data = invokeurl
  4. [
  5. url :"https://www.zohoapis.com/inventory/v1/salesreturns/" + id + "?organization_id=" + organization.get("organization_id")
  6. type :PUT
  7. parameters:dataMap.tostring()
  8. connection:"zom2"
  9. ];
  10. info pop_lab_data;
  11. //

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)

{"custom_fields":[{"api_name":"cf_tracking","value":"1ZY777560323320163"},{"api_name":"cf_label_cost","value":"10.08"},{"api_name":"cf_label_link","value":"https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20251107/e860fa67931f3e4566911e57ac0f72076f.pdf"}]}

{"code":1002,"message":"Resource does not exist."}

    Access your files securely from anywhere









                          Zoho Developer Community




                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts





                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources

                                                                                            Zoho Writer

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ






                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方