- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015 08:31 AM
We have an existing business rule that will automatically create a Knowledge NEWS topic article based on Priority = High and Service Board being checked. I am trying to create a new business rule or possibly modify the existing one that will merely change the topic. My business rule is not working. I need assistance. This is my first business rule to try. I do not see where I can attach my business rule here in this new HI format.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015 12:10 PM
Hi Barbara,
Your business rule is not structured to call your code.
When a business rule is created in Fuji releases and newer, the system automatically brackets all of the code inside a function.
function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
}
Per your attached screenshot, you have this function in your business rule as expected. But then you appended all your code and your new functions after this one, and outside the structure.
Try the following:
function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
var sub = gs.getProperty('glide.knowman.submission.workflow');
if (sub == 'true')
submitCandidate();
else
submitDirect();
}
function submitDirect() {
// your function
}
function submitCandidate() {
// your function
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015 08:57 AM
barbclark You should be able to edit this community post and add your attachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015 10:01 AM
I would like to see any replies / updates to my questions at the top (as in an Incident) as opposed to the bottom.
Any lengthy discussion will entail scrolling to the bottom each time.
Will I be informed when anyone has replied to me or do I just have to keep looking?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015 10:30 AM
Hi Barbara,
You will be notified when somebody responds to your post. Please make sure you ensure you have setup your email preference - refer to the doc if you need help: https://community.servicenow.com/docs/DOC-1795#preferences
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015 12:10 PM
Hi Barbara,
Your business rule is not structured to call your code.
When a business rule is created in Fuji releases and newer, the system automatically brackets all of the code inside a function.
function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
}
Per your attached screenshot, you have this function in your business rule as expected. But then you appended all your code and your new functions after this one, and outside the structure.
Try the following:
function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
var sub = gs.getProperty('glide.knowman.submission.workflow');
if (sub == 'true')
submitCandidate();
else
submitDirect();
}
function submitDirect() {
// your function
}
function submitCandidate() {
// your function
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2015 06:04 AM
Thank you, but I am not this advanced in my system admin skils. I would prefer SN incident be opened and someone call me to walk me thru this one.
Also, for anyone monitoring this thread, I am not receiving emails when there are replies. I believe I have my profile set up correctly to receive emails. I do receive emails automatically for any articles in the Incident Management space, but not Knowledge. Is there a specific setting just for this?