function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Julia ZocoloJulia Zocolo 

S-Docs Conditional Template Selection- Custom Button

Hello Everyone,
I am working on a finance project utilizing the application S-Docs.

I would like for my finance team to be able to click on the custom "Invoice" button and then based on 4 fields and their selections, the correct template would automatically be selected.

I know this is possible as S-Docs has the documentation here: http://www.sdocs.com/resources/documentation/automating-conditional-template-selection-and-generation/

Here is an example of the criteria and hopefully I can build off of that because there are quite a few combinations I need to cover.

If Entity = INC, Language = English, Currency = USD, Taxation Country = United States, then select template id: a1O8E000002Lnq9
If Entity = AG, Language = German, Currency = EUR, Taxation Country = Switzerland, then select template id: a1O8E000002Lpmc

For INC, there are only 3 possible outcomes (templates).
However, for AG, there are 9 possible templates..for now.


Thank you for reading my post--I appreciate your time!!

From S-Docs Documentation


Julia
Rebecca Hendricks 3Rebecca Hendricks 3
You mention that you want to use 4 fields and their selections.  Does that mean that you are wanting to use the Runtime Prompts feature to determine the template?  Or just fields that are already located on your object?