I want to create an option for the Cancel button under the Resolve button on the ticket page of the service portal.

ayano
Giga Guru

Originally, there is no status of cancel in Incident.
To cancel, I need to enter the "Cancelled" in the Resolution Code and Cancelled by Caller in the Resolution notes.

find_real_file.png

However, in the current implementation, when I click Resolve botton, certain characters are automatically filled in those fields.

Therefore, I would like to prepare another option under such a Resolve button and create a specification that clearly states Cancelled in the Resolution code and Cancelled by Caller in the Resolution notes.

How can I create another option under the Resolve button?

find_real_file.png

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

This is part of standard Ticket widget configuration.

You need to modify the widget 'Incident Standard Ticket Actions' as given below:

find_real_file.png

 

Make the Highlighted changes.

To add additional action in dropdown HTML script part would be like:

<div>
    <div class="dropdown" id="child-case-tabs" ng-if="data.showActions">
        <button type="button" id="actions-button" class="btn btn-default dropdown-toggle action-btn" data-toggle="dropdown" style="width : 100%" aria-haspopup="true" ng-init="setFocusOnActionButtons()">
            ${Actions}
            <span class="caret"></span>
        </button>
        <ul class="dropdown-menu pull-right" 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.canResolve" href="javascript:void(0)" ng-click="$event.stopPropagation();cancelIncident()">${Cancel}</a>
            </li>
            <li>
                <a ng-if="data.canReopen" href="javascript:void(0)" ng-click="$event.stopPropagation();reopenIncident()">${Reopen}</a>
            </li>
            <li>
                <a ng-if="data.canClose" href="javascript:void(0)" ng-click="$event.stopPropagation();closeIncident()">${Close}</a>
            </li>
        </ul>
    </div>
  
</div>

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

6 REPLIES 6

Sulabh Garg
Mega Sage
Mega Sage

Hello

Please see the below link, It should help you.

https://www.servicenowelite.com/blog/2020/9/1/ticket-actions-widget

Please Mark Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

Please Mark Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Anil Lande
Kilo Patron

Hi,

This is part of standard Ticket widget configuration.

You need to modify the widget 'Incident Standard Ticket Actions' as given below:

find_real_file.png

 

Make the Highlighted changes.

To add additional action in dropdown HTML script part would be like:

<div>
    <div class="dropdown" id="child-case-tabs" ng-if="data.showActions">
        <button type="button" id="actions-button" class="btn btn-default dropdown-toggle action-btn" data-toggle="dropdown" style="width : 100%" aria-haspopup="true" ng-init="setFocusOnActionButtons()">
            ${Actions}
            <span class="caret"></span>
        </button>
        <ul class="dropdown-menu pull-right" 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.canResolve" href="javascript:void(0)" ng-click="$event.stopPropagation();cancelIncident()">${Cancel}</a>
            </li>
            <li>
                <a ng-if="data.canReopen" href="javascript:void(0)" ng-click="$event.stopPropagation();reopenIncident()">${Reopen}</a>
            </li>
            <li>
                <a ng-if="data.canClose" href="javascript:void(0)" ng-click="$event.stopPropagation();closeIncident()">${Close}</a>
            </li>
        </ul>
    </div>
  
</div>

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

I have copied most of the part of resolve action, you can make required changes to state and other values  as per your requirement.

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hi,

Thank you for the reply.

I modified the HTML and now I see the Cancel option!

Would you please copy the entire script where other changes are needed and post it?

 

Thanks and Regards,