Business Rule Condition call Script Include

Chad Wilhelm1
Tera Expert

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

find_real_file.png

find_real_file.pngfind_real_file.png

 

11 REPLIES 11

Ujjawal Vishnoi
Mega Sage
Mega Sage

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

Hello Thank You,

I am receiving this errorfind_real_file.png

Business Rule Condition

new from_Idea.checkIdea(current)

Script Include

find_real_file.png

Can you try what I have suggested?

in the script include line 2 your form_idea should be replaced with form_Idea is not similar to the name you have define.