Calling a script include in an Incident template

Dubz
Mega Sage

Hi All,

I'm trying to call a script include in an incident template and it's not playing ball. I've written and tested the script include, it's pretty simple, just taking a date/time field and adding 30 minutes to it. I'm trying to call this in an Incident template as below but, as far as i can tell it's not even making the call, let alone returning the value

//with classful script include:
javascript: new ScriptIncludeName().functionName(field,seconds);

//straight up function:
javascript: new functionName(field,seconds);

I've tried removing the arguments and just statically setting things in the script include but that doesn't work either. Anyone got any input on whether this is even possible or if i'm barking up the wrong tree?!

Cheers

Dave

1 REPLY 1

Community Alums
Not applicable

Hi David,

I have seen this issue. What I did

1) Created a Script Include without any class name (Just create a function). Look below screen shot

find_real_file.png

 

 

2) To call it write:

 javascript:getAssetsSublocation('ABC');

 

Let me know in case of any issues.

Cheers,

Hardit Singh