- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2020 06:48 AM
Good morning developers,
I need a little help. I was tasked with creating a button on our Service Portal for Closed Tickets. This button will be called Reoccurrence. The functionality is for the user to be able to go to a closed ticket from the Ticket Conversations view and be able to copy the fields from the closed ticket and create a new ticket and redirect them to the ticket in Ticket Conversations. I read over several articles on the community where other developers created buttons but I couldn't find anything on what I'm trying to do.
I did find this article: https://serviceportal.io/create-custom-action-buttons-service-portal/ which was helpful but I still can't get the button to do what I need it to do. I have attached a few screenshots of my code. Any help will be greatly appreciated.
Here's a copy of the page of where I want the button:
Here's my code from the widget that I created:
Best regards,
cnharris
Solved! Go to Solution.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2020 06:51 AM
Hello,
Can you use gr.setValue(field,value) instead of setting the values directly?
Thanks,
Jagadeesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2020 10:47 AM
Replace Lince no 8 with below
Line 8: (Replace below statement with your current)
Var gr = new GlideRecord('incident');
gr.initialize();
You have only below there
gr =new GlideRecord('incident');
-Vinay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2020 11:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2020 11:48 AM
I think I may have figured part of it out. The record is being created but how would I copy the values from the current ticket over to the new ticket in the portal?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2020 05:19 AM
Can you put log messages and check if you are getting any input values.
for example like below:
Put log message for input
gs.log(input.short_description) and click on Reoccurrence button. see if there is any data in it.
-Vinay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2020 06:37 AM
I put the gs.log(input.short_description) in the code and in the system logs, its coming back as undefined.