GildeURL is not defined. Javascript error in browser console after Kingston patch

Akshata5
Tera Guru

find_real_file.png

Can anyone help me to give the alternate code for GlideURL() in below script as it is not supported in Kingston.This is very urgent for me.

After Kingston upgrade I get Javascript error in my dev instance.

When I check in console below is the error. GildeURL is not defined.

 find_real_file.png

 

Below is the onload client script.

function onLoad() {

             

              var gURL = new GlideURL();

              gURL.setFromCurrent();

              var event = gURL.getParam("sysparam_marketing_event");

              var eventCount = gURL.getParam("sysparam_marketing_event_count");

              //alert(event);

              if(event && eventCount){

              g_form.setValue('marketing_event',event);

              //g_form.setValue('special_instructions',eventCount);

              }

             

}

 

1 ACCEPTED SOLUTION

Hi Ankur,

Issue got resolved after changing the client script ui type to desktop from All.

 

Regards

Akshatha

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Akshata,

I think in onLoad you want to get the parameter value. Use following alternate way and try once.

var markEvent = getParmVal('sysparam_marketing_event');

function getParmVal(name){
    var url = document.URL.parseQuery();
    if(url[name]){
        return decodeURI(url[name]);
    }
    else{
        return;
    }
}

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Thank you Ankur.

Still i am getting same error after using below code

 

 

 

 

Hi Akshata,

Can you share the browser console error after updating the code.

Regards

Ankur

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

Hi Akshata,

Any update on this?
Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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