g_form.showFieldMsg is not working in agent work space.

KaMmILa__
Tera Expert

I have a Onchange client script on a field which is running on ALL UI type ( working fine in native view) but displaying the info message only for 1 sec and disappearing. Is that not supported in  Agent work space ?

I also unchecked the Global and specified the view still having the same issue.

I also tried g_form.showFieldMsg('<variable_name>', 'msg', 'info', false); but no luck 

below is the client script 

find_real_file.png

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

just give a try. 

try to pass second parameter in setValue('field name',<group id>,<grp name>);

 

I would suggest use glide ajax to get the group id and group name to set it on client side and then add showFieldMsg() see if focus issue is solving or not. 

 

Also if it's showing msg again and again, use condition something like below. 

If(g_form.getValue('field_name') != <group id which you get from script include >){

// add show field msg here. 

}

 

 

 

 

View solution in original post

13 REPLIES 13

Allen Andreas
Administrator
Administrator

Hi,

Is the field being set by your function in this client script?

Basically, trying to see if the function itself is even working first before looking at anything else.

I know there are some API's that won't work on agent workspace.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

yes that is set by me in the client script

So you're callback function if triggered runs before the lone hidefieldmsg you have out there. Or the lone script runs, then loops back around and runs again. I'd recommend placing conditions around that as to when to use that line instead of it just "being there".


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

If i select servicenow incidnet management then the info message is showing but for the rest it is not showing up