Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

To Add UI Action Button in Employee Center

saha_1
Tera Contributor
 

I want to add Copy Incident UI Action an addition dropdown in Actions Button in Employee Center, Please guide me how can I achieve that. UI Action Button in ServiceNow12.jpg

3 REPLIES 3

Dinesh Chilaka
Tera Guru

Hi @saha_1 ,

To add an one more action in those actions widget is not easy way.OOB widget Incident Standard Ticket Actions, you need to clone this widget and add the new button in the HTML code of this widget

<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="fa fa-caret-down"></span>
        </button>
        <ul class="dropdown-menu pull-right" id="actionList">
            <li ng-if="data.canResolve">
                <a href="javascript&colon;void(0)" ng-click="$event.stopPropagation();resolveIncident()">${Resolve}</a>
            </li>
            <li ng-if="data.canReopen">
                <a href="javascript&colon;void(0)" ng-click="$event.stopPropagation();reopenIncident()">${Reopen}</a>
            </li>
            <li ng-if="data.canClose">
                <a href="javascript&colon;void(0)" ng-click="$event.stopPropagation();closeIncident()">${Close}</a>
            </li>
            <li ng-if="data.canCopy">
                <a href="javascript&colon;void(0)" ng-click="$event.stopPropagation();copyIncident()">${Copy Incident}</a>
            </li>
        </ul>
    </div>
</div>

 

Like this and you can also need to write the code in the server side and the client side controller to perform action after clicking on that button.

Instead there is one more approach, you can make Action widget field empty of the following record  33ad80e787f10010e0ef0cf888cb0b87 (sys_id) and add the records in the standard ticket actions related how it is showing in the following image.

 

Screenshot 2026-03-17 at 3.25.22 PM.png

If my response helped, mark it as helpful and accept the solution.

 

AlfrinAJ
Tera Guru

Hello @saha_1 !

 

You can achieve it be creating a standard ticket action record in std_ticket_config_action table.

Code:

(function(inputs, outputs) {
    var newInc = new GlideRecord('incident');
    newInc.initialize();
    newInc.short_description = current.short_description;
    newInc.category = current.category;
    newInc.insert();

    outputs.messageType = 'info';
    outputs.messageValue = gs.getMessage("Incident Copied!");

})(inputs, outputs);

Copy Incident Code.png

Note: Add more fields that you want to copy from current incident.

 

Sample Output:

Copy Incident ESC.png

 Before Clicking the button:

Copy Incident Before.png

 After clicking the button:

Copy Incident After 01.png

Copy Incident After 02.png

 Hope this will be of help for you!

 

Regards,

Alfrin

Ankur Bawiskar
Tera Patron

@saha_1 

please use approach suggested by other members and proceed

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader