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.
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
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.
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.
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
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.