Agent Workspace: Highlight VIP user in Agent workspace for interaction table in form view

AKASH BANERJEE
Mega Guru

 

We have a requirement to highlight the VIP users in interaction table in Agent Workspace in form view in servicenow.

Let me know if anyone have any idea on how we can implement that.

I have implemented it in incident and interaction table using the client script and style but not in Agent workspace view.

1 ACCEPTED SOLUTION

Sebas Di Loreto
Kilo Sage
Kilo Sage

Most likely the code you are using on the client script is not good for the workspace environment. 

This code works on all environments.

 

function onChange(control, oldValue, newValue, isLoading) {    
    if (!g_form.hasField('opened_for'))
        return;
    if (!newValue)
        return;
   
    g_form.getReference('opened_for', ref);
    function ref(user) {
        if (user.vip == 'true')
            g_form.showFieldMsg('opened_for', 'This is a VIP user', 'error');
    }
}

 

SebastianDL_0-1670358011185.png

 


If I helped you with your case, please click the Thumb Icon and mark as Correct.


View solution in original post

6 REPLIES 6

@AKASH BANERJEE 

Most likely the script UI type is ALL. If you want it to apply only to the platform UI then make it Desktop. If you want it on workspace make it Mobile/Service Portal


If I helped you with your case, please click the Thumb Icon and mark as Correct.


Hi Sebastian,

 

Thankyou for the solution. It is working perfectly as expected.