Editing a sales Order / Invoices with Deluge Script

Editing a sales Order / Invoices with Deluge Script

Hello,

In Books, I have Sales Order (draft) that I need to update. Depending of some parameters, I need to update the description of each line items.
I wrote a simple deluge script for test purposes first. I can read the sales order and all line items perfectly. However what is the process to update the line item description ? What is the content of the Map in zoho.books.updateRecord() function ?

1. should I provide only changes to each line items (is only the description fields alone with the line_item_id) or
2. should I provide all fields again ? and what fields are necessary.

I tried 1, provided line_item_id and description field for each line items. Zoho replied that fields for line items where missing. (for example the article_id)
I tried 2. and used all the fields fetched from the sales order line items. Zoho replied that some fields are unknown (for example product_type, quantity_manuallyfulfilled). There are no custom fields.

I'm a bit confused of what fieldto provided to only change the description of each line items.

Map provided for case 1. :
{
"line_items": [
{
"line_item_id": 49291400002684030,
"description": "this is an edit description"
},
{
"line_item_id": 59291500002484032,
"description": "another description change"
}
]
}

Thanks for your help.




                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources



                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources


                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources


                                                            Zoho Sprints Resources


                                                              Qntrl Resources


                                                                Zoho Creator Resources


                                                                  Zoho WorkDrive Resources



                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series


                                                                      • Tips

                                                                        Tips

                                                                      • 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