Business Rule Condition call Script Include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2021 10:58 AM
Hello,
We currently have this business rule which runs on story that sets Epic and Assignment Group. We want to override this if the story is not created from an Idea. So if a story is created manually do not set Epic and Assignment Group. So I thought call SI from BR Condition and return true if the task field on idea matches a story sys id. Not sure what I am doing wrong here. Any assistance is appreciated. Thanks, Chad
- Labels:
-
Workflow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2021 11:10 AM
Change the condition in BR as below.
new from_idea.hr_Utils().checkIdea(current)
and script include as below.
var from_idea = Class.create();
from_idea.prototype = {
initialize: function() {},
checkIdea: function(grStory) {
var gr = new GlideRecord("idea");
gr.addQuery("task", grStory.getUniqueValue());
gr.query();
if (gr.hasNext()) {
return true;
} else
return false;
},
type: 'from_idea'
};
Hope this helps.
Regards,
Ujjawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2021 11:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2021 11:55 AM
Can you try what I have suggested?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2021 11:58 AM
in the script include line 2 your form_idea should be replaced with form_Idea is not similar to the name you have define.