

Custom Function:
Navigate to Settings -> Automation -> Custom Functions -> +New Custom Function > Add the function code from this GitHub link.
Workflow Rule:
Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below:-

Here's how the custom function will work:-
The workflow rule gets triggered and executes the custom function every time a customer is created or edited. During this process, the system will check the portal language chosen for the customer and automatically associate the corresponding invoice template.

We have provided the script for linking invoice PDF templates. If you require assistance in associating the templates of other modules, you can reach out to our support team. Feel free to share any queries or comments you have about our custom functions. Your viewpoints are valuable to us and we look forward to receiving your feedback!
Regards,
Shireen Farhana S
Zoho Books.