How do I call a script include from the mobile agent?

kimberlylp
Giga Guru

I have a UI Action to copy a task. It calls a script include with the following code:

var copyToNewTask = new u_task_utility();
var newTask = copyToNewTask.copyTask();
 
When I try to call the same script include from the mobile agent Action, the screen hangs. I'm assuming the agent does not pass in current, so I tried passing in input and setting current = input; the screen still hangs.
1 ACCEPTED SOLUTION

kimberlylp
Giga Guru

Service Now support informed me there is no way to read/display the return message from a script include. I only have access to the record in hand. They suggested I create a column and write the response in it to display.

 

Since I am creating a copied task, I chose to write to the correlation_id column then display that in the Success Message. Not ideal because the message is only displayed for 5 seconds. I'll just need to inform my end users to quickly write it down or memorize it as there is no copy/paste in this app (what's up with that!?!).

 

Success message = {{correlation_id}}

View solution in original post

5 REPLIES 5

kimberlylp
Giga Guru

Service Now support informed me there is no way to read/display the return message from a script include. I only have access to the record in hand. They suggested I create a column and write the response in it to display.

 

Since I am creating a copied task, I chose to write to the correlation_id column then display that in the Success Message. Not ideal because the message is only displayed for 5 seconds. I'll just need to inform my end users to quickly write it down or memorize it as there is no copy/paste in this app (what's up with that!?!).

 

Success message = {{correlation_id}}