CSR decoder script giving - Error: \"GlideAjax\" is not defined.,Detail: \"GlideAjax\" is not define

Aromah
Tera Contributor

Hello, I am trying to figure out a script that could decode the CSR values like CN, SAN, Key Size, Key Type, O, OU, S, C, etc. from the data entered in the service catalogue form. I tried referring Solved: Decode CSR (Certificate Sign Request) - ServiceNow Community article, and  currently using attached the script to decode the CSR. 

 

I verified the code but I keep getting following error, I am not sure from where to start to fix this -

Could someone suggest a way out for this please?

 

Thanks in advance! 

{
    "Action Status": {
        "code": 1,
        "message": "Error: \"g_form\" is not defined.,Detail: \"g_form\" is not defined."
    }
}
    "Action Status": {
        "code": 1,
        "message": "Error: \"GlideAjax\" is not defined.,Detail: \"GlideAjax\" is not defined."
    }
}

 

2 ACCEPTED SOLUTIONS

Mannapuram
Tera Guru

@Aromah Hope you are running this script in a client script. The error messages convey that, they are not able to process g_form and GlideAjax as both of them are client side ones.

 

Follow the other article carefully, they did mention to use it in a client script. 

View solution in original post

Sandeep Rajput
Tera Patron
Tera Patron

@Aromah It appears to me that you are trying to run a client side scripting code in a server side script (e.g. business rule/script include)

View solution in original post

3 REPLIES 3

Mannapuram
Tera Guru

@Aromah Hope you are running this script in a client script. The error messages convey that, they are not able to process g_form and GlideAjax as both of them are client side ones.

 

Follow the other article carefully, they did mention to use it in a client script. 

Sandeep Rajput
Tera Patron
Tera Patron

@Aromah It appears to me that you are trying to run a client side scripting code in a server side script (e.g. business rule/script include)

Aromah
Tera Contributor

Thank you both, corrected my mistake and got the right script to solve it.