

- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Out of box of box with ServiceNow, you may have noticed that your Published date actually falls in line with the Created date.
By creating this simple business rule defined below, you will be able to easily have knowledge articles whose publish date actively reflects the date of publish, and not the date of creation!
1.) Navigate to any Business Rule list and select the 'New' option:
a. Define the name to something relevant such as 'Set Publish Date'
b. Define the table as the Knowledge [kb_knowledge] table.
c. Select the 'Advanced' view option.
2.) Under the When to run section:
a. Set the run option to on 'Update'.
b. Set the run condition to 'Workflow' 'changes to' 'Published'.
3.) In the advanced section, specify the following script (no conditions):
function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
//create glide date time object
var gdt = new GlideDateTime();
//set published date to current date (use getLocalDate for local user time)
current.published=gdt.getDate(); }
Congratulations! Your published field will now reflect the actual date the KB Article is set to published!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.