Vulnerability Response- Request Exception UI Action - Where to edit unit field

Jaydeee
Tera Contributor

Dear community experts,

I want to update this field values to 60 days and update the error message accordingly , how do I achieve it.

Jaydeee_0-1705564519224.png

Thanks in advance!

1 ACCEPTED SOLUTION

Hi @Jaydeee 

To change the Exception Duration from 12 to 6 months, you can look into the Exception Management Configuration [sn_vul_exception_config].

Timi_0-1705572904446.png

Now, you can config the Duration Validation for a specific table.

 

And to custom the Error Message, you can check the line 476 > the function getErrorMessageInvalidUntilDate().

Timi_1-1705573046561.png

 

Cheers,

Tai Vu

View solution in original post

3 REPLIES 3

piyushsain
Tera Guru
Tera Guru

Hi you need to call the Client callable Script include:

Client callable Script Include:


var MyDateTimeAjax = Class.create();


MyDateTimeAjax.prototype = Object.extendsObject(AbstractAjaxProcessor, {


calDate: function () {


var sdt = new GlideDateTime(this.getParameter('sysparm_date'));


sdt.addDaysLocalTime(60);


return sdt.getDate();


},


type: 'MyDateTimeAjax'


});


 

Client SCript :

Client Script:


var gr = new GlideAjax('MyDateTimeAjax');


gr.addParam('sysparm_name', 'calDate');


gr.addParam('sysparm_date', g_form.getValue('u_date')); //Please update the field name


gr.getXML(ajaxResponse);


function ajaxResponse(serverResponse) {


var answer = serverResponse.responseXML.documentElement.getAttribute("answer");


alert(answer);


g_form.setValue('field_name', answer);


}

 

This will automatically set the date to 60 days from now, what is the criteria for the error?

If the date is less than 60 days you can check via SI and return true and false and get the error from CS

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain

Tai Vu
Kilo Patron
Kilo Patron

Hi @Jaydeee 

Inside the UI Action Request Exception, you will see it's opening a dialog with the endpoint named "sn_vul_review_request"

You can find it in the UI Page table, or you can use the URL below.

URL: https://<instance_name>/sys_ui_page.do?sys_id=a9f62f0aff3302007a6dffffffffff9e

From the line 65, you should see the date field element.

Timi_0-1705565641728.png

 

Cheers,

Tai Vu

 

Hi @Jaydeee 

To change the Exception Duration from 12 to 6 months, you can look into the Exception Management Configuration [sn_vul_exception_config].

Timi_0-1705572904446.png

Now, you can config the Duration Validation for a specific table.

 

And to custom the Error Message, you can check the line 476 > the function getErrorMessageInvalidUntilDate().

Timi_1-1705573046561.png

 

Cheers,

Tai Vu