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





                        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 Desk 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

                                                                • Word of the Day

                                                                  Word of the Day


                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now