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
Rebecca Hendricks 3Rebecca Hendricks 3 

s-docs template determined by Runtime Prompt

I am trying to generate some S-Doc templates for a department to use.  We want to generate letters that hold the Name, Date, and Amounts associated with transactions.  Several of our letters are similar in nature, with just a few elements being different.

I understand that I can use the Insert RENDER button to set up some conditional testing to have certain parts of the template display if the criteria are met.  However, I have 6 letters that are very similar (only differing by a paragraph at most).  I am concerned that by using the RENDER feature, it will cause the formatting of the letter to be completely messed up.

I know we can ask the user for information as part of a Runtime Prompt.  I can then use the runtime prompts on the template as part of the information. However, I'm wondering if I can use the runtime prompt to determine what template to actually use.

For example, if I select a Denial case type, and that the User Knew the Person making the transaction, I would open template A.  But if I select a Denial case type, and that the PIN on the card was used, then template B would open.  Is this possible within S-Docs?  Or do I need to create a custom component/VF page?
Hi Rebecca,

For this kind of problem in our org what we had done is created one custom field and assigning some key like value like unique string. With the help of Apex we are checking type and then assigning sdocs templates based on this custom field value. You can try same approach.
Logic will be in the apex to assing which template you should assign based on type.

Let me know incase you have any query