- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hello All,
In Esc portal we have action called "Reopen" this shows to the resolved incidents and when clicked on it it directly makes the incident to in progress state.
What i want to achieve is when clicked on it i want to show a popup with additional comments field as mandatory and once filled values there should be a submit button once submitted it should copy that comment values to the incident's additional comments also it should make the incident InProgress the way its working now.
action link-https://yourinstance.service-now.com/std_ticket_config_action.do?sys_id=e17865a5ff0222105146ffffffffffdd&sysparm_record_target=std_ticket_config_action&sysparm_record_row=2&sysparm_record_rows=3&sysparm_record_list=ticket_configuration%3D33ad80e787f10010e0ef0cf888cb0b87%5EORDERBYorder
@Ankur Bawiskar any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I was able to achieve this, see below details
-> In Standard Ticket Config Action, select "User Input" checkbox and Save the record
-> in related list create a new user input of type string, like this and make mandatory using checkbox
-> update the action script to grab the input you created and set in comments field
add this at line 7
Output:
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I was able to achieve this, see below details
-> In Standard Ticket Config Action, select "User Input" checkbox and Save the record
-> in related list create a new user input of type string, like this and make mandatory using checkbox
-> update the action script to grab the input you created and set in comments field
add this at line 7
Output:
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Great Solution @Ankur Bawiskar You are always a helping hand in learning guide.
Also you previous shared links were also helpful and good learning i have achieved this using the widget also but that comes under actions also we are not using this.
So was expecting some solution inside Reopen action itself.
Thank you so much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Nice to hear.
Do share that custom widget also here along with HTML, Server, Client scripts etc so that it helps future members
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Sure @Ankur Bawiskar ,
Cloned the "Incident Standard Ticket Actions" widget and updated below.
HTML:
<div>
<div class="dropdown" id="child-case-tabs" ng-if="data.showActions">
<button type="button" class="btn btn-default dropdown-toggle action-btn" data-toggle="dropdown" style="width : 100%">
${Actions}
<span class="caret"></span>
</button>
<ul class="dropdown-menu" id="actionList">
<li>
<a ng-if="data.canResolve" href="javascript:void(0)" ng-click="$event.stopPropagation();resolveIncident()">Resolve</a>
</li>
<li>
<a ng-if="data.canReopen" href="javascript:void(0)" ng-click="$event.stopPropagation();reopenIncident()">Reopen</a>
</li>
</ul>
</div>
</div>
Note:In the HTML i have just removed the close button as i wanted to remove it once if you need from the original widget copy that:
Server script:
Client controller:
Note:
also create Angulat-ng templatee in the widget's related list and click new.
ID-modalTemplateReopen
Template:
<div class="panel panel-default">
<div class="modal-header" class="panel-heading">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="$dismiss()">×</button>
<h4 class="panel-title">Please provide a reason for reopening:</h4>
</div>
<div class="panel-body wrapper-md">
<form name="modalTemplateReopen" ng-submit="c.Reopen('reopen')">
<div class="form-group">
<textarea required sp-autosize="true" ng-required="true" ng-model="data.reopenComments"
id="reopenComments" placeholder="Comments are required to reopen."
class="form-control ng-pristine ng-valid ng-scope ng-empty ng-touched"
aria-invalid="false"
style="overflow: hidden; word-wrap: break-word; resize: vertical;"></textarea>
</div>
<div class="text-right">
<button type="button" class="btn btn-default" style="margin-right: 15px;" data-dismiss="modal"
ng-click="$dismiss()">Cancel</button>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
</div>
</div>
