The Now Platform® Washington DC release is live. Watch now!
‎09-10-2015 09:36 PM
G'Day ServiceNow gurus,
We just migrated to Fuji and we are starting to play with the knowledge base databases in our development instance.
We have a knowledge template called "Systems new article" which basically fills the text underneath of the "Short description" with an HTML text. Now when I click "Create content" then I have to apply the template to get this default text as shown below
How can I make this template the default so I do not have to apply it ?
If I go to the general defaults then I can not place an HTML default in text
I appreciate any advice.
Kind regards
Carlos
Solved! Go to Solution.
‎09-13-2015 10:40 PM
Two points:
Doing that will result in your Text field looking like this when you create a new record:
‎09-10-2015 10:18 PM
Hi Carlos,
Please go through the below link for more info.
http://www.servicenowguru.com/system-definition/advanced-templates/
Basically you can have onLoad client script where you can make the template to default.
‎09-10-2015 10:42 PM
‎09-10-2015 10:59 PM
Hi Carlos,
You have to use applyTemplate(template); //Pass template sys_id here
Please refer section 4 in the above link I have shared.
‎09-11-2015 01:38 AM
Hey Carlos
There's a couple of approaches here that you've hinted at, so I just wanted to clarify a couple of things.
With the general defaults they will apply when creating a new KB article and setting the value of the Knowledge base field. As an example (using an OOB demo):
Now, you can create Templates (per your first screen shot) which can be applied by a user. So let's create a template. While you're on the Knowledge form, right-click on the Form Header and select Template -> Edit Templates then click on New at the top of the list. For simplicity I created a Template like so:
And in the Template field, select Text from the drop down and give it a value like:
<h1>some html text</h1>
<p>is it working</p>
Test it by navigating to Knowledge -> Create New and selecting the newly created template by right-clicking on the Form Header and selecting it from the Template sub-menu.
You can get this to apply on load in a couple of ways:
As you can see there is no need to go through much implementation to achieve this requirement. Though you can certainly look at the SNC Guru link for more complex templates, though I've not tried it .