how to call script include in argument from module and link type is list of record

manish64
Giga Guru

i tried to below ways

  • : javascript:scriptincludename().functionname();
  •  javascript: new scriptincludename().functionname();
  •  javascript: new scriptincludename().functionname();
  •  javascript: new functionname(); script include name is same name as function name
    javascript: functionname(); script include name is same name as function name

 

could anyone help on this 

 

1 ACCEPTED SOLUTION

manish64
Giga Guru

Solution is script include and function name should be same and be called javascript: functionname();

View solution in original post

18 REPLIES 18

manish64
Giga Guru

i am trying to create module , where trying to filter incident based of user location through script include

I am not sure about arguments, but I usually create these kind of modules as below.

 

1. Open actual table list view.

2. Set filter condition using JavaScript as required.

for ex: assignment group.sys_id - is one of - javascript:getMyGroups();

run the filter.

if filter working as expected, copy the URL post ".com/" and paste it in module link and set module type as URL.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

if you are returning comma separated sys_ids of location from script include, you can set argument as below.

find_real_file.png

 

Similar to above you can try.

 

But one question, why you are going with argument when you can put script include in condition builder or even create module of type URL and copy direct URL?

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

manish64
Giga Guru

@Ankur Bawiskar @asifnoor @Ashutosh Munot  Help me on this

 

Hello Manish,

If you are using link type as list of reocrds then arguments is basicaly used to filter those records.

If that is the case, then you can call like this

javascript: 

sys_id=javascript:new scriptincludename().functionname();

OR

sys_idINjavascript:new scriptincludename().functionname(); (If your SI is returning an array of sys_ids)

For more information, go to sys_app_module.LIST in your instance and filter by

Arguments contains New()

and 

link type is list of records and check the available arguments.

Mark the comment as a correct answer and also helpful if this helps to solve the problem.