We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Display message to end user while submitting the request

Jyo090
Tera Contributor

Hi Team,

 

I have a requirement to display a message to end user while submitting the request . Can you please let me anyone done this.

6 REPLIES 6

shubhamdubey
Mega Sage

Hi @Jyo090 

If you want to show anything before submitting the request you can write the onload client script.

Can you explain more of your use-case.

 

Thanks 

Shubham

"You have selected options that relate to an incident.  Please use the "Create Incident" form or, if urgent, contact the ITSD by Phone or on Teams "

 

I want to display above message on submit client script. I am looking for script.

Hi @Jyo090 

 

You can use below onsubmit script 

 

function onSubmit() {
   //Type appropriate comment here, and begin script below
   g_form.addInfoMessage('You have selected options that relate to an incident.Please use the "Create Incident" form ,or if,urgent contact the ITSD by Phone or on Teams ');
Screenshot (58).png
   
}

 

we want create highlight hyperlink "Create Incident" for this button on the form.Please suggest on this.