- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 07:33 AM
I have a UI Action to copy a task. It calls a script include with the following code:
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2019 08:01 AM
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}}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 08:00 AM
I don't think input will be the same as current. You'll likely need to construct an object and pass it into your script include with specific values. What happens when you try to debug this process? Are there any errors?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 08:51 AM
Hi Brad,
I'm very new to apps. This whole thing is a learning curve for me and there is not much documentation provided by Service Now. How do you debug a mobile app?
What I have managed to do is find that input has an input.sys_id. Since I know it's a task, I've done the following (note incident_task, change_task and problem_task use this function):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 09:59 AM
What I'm struggling with now is how to display the return in an info message to let the user know what task number was created.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2019 06:39 AM
I don't think you'll be able to show an info message on mobile, but you can show success and failure messages on an action. I can't remember how dynamic those are, though.