How to hide the add info message or any field when page refresh from browser or by ui action

Rajababu
Giga Guru

Hi,

I want to hide add info message or hide a field into incident form.

Use case is this :

When we are opening (existing record open into the tab) then those field (for every time) msg or field will appear, apparently if user refresh the page via Browser or click on save button on same form it will hide the field and next time same record open from list same will be repeated .

It's tricky, need to understand : How i can check the refresh page without updating any field value? 

if you are not updating any field it won't update the field even if you click on save button.

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

how is the message shown? based on some condition and from where?

Regards
Ankur

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

Hi Ankur,

function onLoad() {

/*var count = 0;
alert(count );
count = count + 1;*/

var PopupMessage= "<font color='black'>You may not include in the comments and free text fields <br> Please refer to this <a href='https://dev68784.service-now.com/kb_view.do?sysparm_article=KB012345' target='_blank' rel='noopener noreferrer nofollow'>link</a> See How it works I need some extrac confguration</font>";

// if (g_form.isNewRecord()) {
g_form.addInfoMessage(PopupMessage);