Function #9: Copy attachments of Sales Order to Purchase Order on conversion

Function #9: Copy attachments of Sales Order to Purchase Order on conversion

This week, we have written a custom function that automatically copies the attachments uploaded for a sales order to the corresponding purchase order after you convert it. Here's how to configure it in your Zoho Books organization. 

Custom Function: 

Hit the Settings icon -> Automation -> Custom Functions -> +New Custom Function. After entering a name and choosing the module for the custom function, you'll see a sample function appearing in the code space by default. Remove it and paste the script that we have shared in this GitHub link. 



Ensure that you create a Connection by the name "zbooks" as well. Missing to create this will disallow you from saving the function successfully. Check out the following GIF to learn how to create the connection. 



Workflow Rule: 

What drives your custom function to be executed automatically is a workflow rule. Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set the workflow up this way: 




In the final step of the workflow, choose the custom function you created and then hit Save. 

Now, you're good to go. Give it a whirl by converting a sales order that has attachments to a purchase order and verify if the attachments are carried through. Do note that any workflow or custom function created in Zoho Books will execute after the action of transaction creation only and not during. Therefore, look for the attachments after the PO is created. 

Should you need any assistance on this, we're for you. 

If you're liking this series so far and would like to get a Zoho Books routine of yours automated, dive right into the comments below. We'd love to hear from you. 

Regards,
Divya R
Zoho Books

    Access your files securely from anywhere


          All-in-one knowledge management and training platform for your employees and customers.







                                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


                                                                                                          ご検討中の方