The CreatorCon Call for Content is officially open! Get started here.

How can I hide reference icons next to the caller_id field?

PaulHoogenboom
Tera Contributor

Hi,

On the incident form we have two reference icons next to the caller_id field: "Add new user" and "Change user".

Those icons are not visible on the self service incident form. This is all Eureka

I have upgraded one of the non-production instances to Helsinki, and all of a sudden, those icons are visible on the self service form.

Is there a way to hide those icons only on the self service form?

I have tried a on load client script where I entered the "ess" view name, after unchecking the global checkbox.

In the script section I added this code:

function onLoad() {

    //Type appropriate comment here, and begin script below

    $('add_new_user.incident.caller_id').hide();

    $('change_user.incident.caller_id').hide();

}

The icons still appear on the self service form.

Maybe the UI macro's need to be changed, but I don't know how to do this.

Kind regards,

Paul

1 ACCEPTED SOLUTION

marcguy
ServiceNow Employee
ServiceNow Employee

you may even be able to do this even cleaner by checking the view



<g:evaluate>


    var currentView = RP.getParameterValue('sysparm_view');


</g:evaluate>



then just running if view is not ESS


View solution in original post

11 REPLIES 11

sensiple
Giga Contributor

Thank you so much for your response mguy Employee.



Actually i want to add my cutomized phone icon next to the "contact" field and that should be clickable.


When im clicking it, the rest service should be called which is hosted in the another server.




Whether i have to use UI Macro or UI Actions ?


Where i have to write this jelly script?


title and alt attributes are mandatory in the image tag?


marcguy
ServiceNow Employee
ServiceNow Employee

yes a UI Macro using most of the code above, should do the same thing, upload a phone icon via the IMAGES module and then take a note of the URL given in order to show it.



what isn't included in the code above is the actual onClick function which also needs to be in the UI Macro as well so I would expect your GlideAjax call to be in there to initiate the REST Message Service etc



in your image section:


        onclick="beginRestOnClick('${ref}')"



in your UI Macro somewhere:


      function beginRestOnClick(reference) {