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
08-18-2021 07:49 AM
Hi ,
If I helped you to resolve your query with my answer. Then I would really appreciate if you can mark my answer correct and helpful. So that it can be moved to answered list and helpful for future readers.
Regards,
Ujjawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2021 11:11 AM
Please try to create a function outside of the initialize and in BR call that function by using new <ClassName>.<FunctionName >
It will work. if not then let me know.
Script include:
var from_idea = Class.create();
from_idea.prototype = {
initialize: function() {},
checkIdea: function(grStory) {
var gr = new GlideRecord("idea");
gr.addQuery("task", grStory.sys_id);
gr.query();
if (gr.hasNext()) {
return true;
}
return false;
},
type: 'from_idea'
};
BR: new from_idea.checkIdea(current)
If this helps you please mark it correct or helpful.