The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Infomessages on portal

Jan Brani_
Tera Expert

Where I can configure infomessage on portal, for example when new HR case is created, there are two infomessages, I need to change them little bit (trim surname and change link) but I have no idea where I could find them.

find_real_file.png

1 ACCEPTED SOLUTION

Paul Wydra III
Tera Expert

Hi Jan,



You can edit the "Created..." message by editing a Widget. The Widget you are seeking is called SC Catalog Item (widget-sc-cat-item). Clone that widget to begin making your changes.



The logic for generating the messages exists in the Client Script.



Edit the function at the bottom of the Client Script, called issueMessage(). This is what is called after the form has been submitted, and the order has been processed.


function issueMessage(n, table, sys_id) {


  var page = table == 'sc_request' ? 'sc_request' : 'ticket';


  var t = "${Created} " + n + " - ";


  t += "${track using 'Requests' in the header or}";


  t += ' <a href="?id=' + page + '&table=' + table + '&sys_id=' + sys_id + '">' + "${click here to view}" + '</a>';


  spUtil.addInfoMessage(t);


}


Once you have made the changes, simply replace the OOB Widget Instance that appears on the page "sc_cat_item", with your newly cloned one.



If you want to see where issueMessage() gets called, take a peek at the getOne() function for its use.



I am unsure where the "assigned to" message gets called from, but it is not in the Widget from what I can tell.




Thanks.


View solution in original post

17 REPLIES 17

michal29
Kilo Guru

Hello Jan,



You may want to modify the info messages sent by system.



Take a look at those info messages:


gs.addInfoMessage('Email address added for notification');



More on this here: GlideSystem - ServiceNow Wiki



Regards,


Michal


Hello Michal,


thanks for answer. I am looking for place where this particular infomessages are called from, whether it is in some script include, business rule or in some portal widget. I look on all these places but with no succes.


Jan,



Well most likely the only person that knows where to look for it is the person that wrote it sadly.


But you can narrow the searches because you know this:


-> It is server side, so probably a business rule or other server side script.


-> it is reffering to HRC000 so I would check in that table for any business rules working on insert or update.


-> it is working onChange/ onUpdate/ onInsert of something, so that eliminates part of scripts as well,



Regards,


Michal


Try this -


https://your instance name here.service-now.com/sp_config?id=page_edit&p=sc_cat_item&table=sp_widget&sys_id=0fd6a6f247230200ba13a5554ee490b3&spa=1