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

Caller is Vip or not

pragatishendre
Tera Contributor

Check if the caller is VIP or not. If Caller is VIP show alert as ‘Caller ‘-Caller Email ID-’ is VIP ’.
Without using GlideAjax, Write onLoad Client Script.
Using getReference in Client Script.

2 REPLIES 2

Amit Verma
Kilo Patron
Kilo Patron

Hi @pragatishendre 

 

Configure an On-Load Client Script on Incident table as below :

AmitVerma_0-1730773157743.png

 

function onLoad() {
    //Type appropriate comment here, and begin script below
    g_form.getReference('caller_id', function(ref) {
        if (ref.getValue('vip') == 'true')
            g_form.addInfoMessage(ref.name + '-' + ref.email + '- is VIP');
    });
}

Output :

AmitVerma_1-1730773376115.png

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hitoshi Ozawa
Giga Sage
Giga Sage

@pragatishendre What you've requested.

 

function onLoad() {
    var caller = g_form.getReference('caller_id', function doAlert(caller) {
        if (caller.vip == 'true') {
            alert('Caller ' + caller.email + ' is VIP');
        }
    });   
}

HitoshiOzawa_3-1730774668795.png

 

Execution result:

HitoshiOzawa_2-1730774657184.png