GlideAjax - changes priority

yardenKrispel
Tera Contributor

Hi, I would like to know why the code doesn't work for me? What I need to do is as soon as I open an incident and put in the caller a client who is a VIP, then the priority automatically changes to 1. This is important as soon as I open before I save , But this is the only way I need - GlideAjax I am attaching pictures of what I did but it doesn't work 

yardenKrispel_0-1700489727002.png

 

yardenKrispel_1-1700489748631.png

 

12 REPLIES 12

Hi @yardenKrispel ,

 

Yes there is some issue in Script include as well. Please find the updated one

 

MyGlideAjaxScriptInclude.prototype = Object.extendsObject(AbstractAjaxProcessor, {
    getVIPStatus: function() {
        var userId = this.getParameter('sysparm_sys_id');
        var userRecord = new GlideRecord('sys_user');

        if (userRecord.get(userId)) {
var vip = userRecord.vip;
            return vip;
        }

        return 'false';
    },

    type: 'MyGlideAjaxScriptInclude'
});

 

Thanks,

Danish

 

Hi @yardenKrispel ,

 

MyGlideAjaxScriptInclude.prototype = Object.extendsObject(AbstractAjaxProcessor, {
    getVIPStatus: function() {
        var userId = this.getParameter('sysparm_sys_id');
        var userRecord = new GlideRecord('sys_user');

        if (userRecord.get(userId)) {
var vip = userRecord.vip;
            return vip;
        }

        return 'false';
    },

    type: 'MyGlideAjaxScriptInclude'
});

 

Thanks,

Danish

 

Danish Bhairag2
Tera Sage
Tera Sage

@yardenKrispel ,

 

I believe priority is also dependent upon Impact & urgency so try setting that as well. It should work.

 

Thanks,

Danish