g_form.getControl().styles is not working in the Agent Workspace

Madhav Rao D V
Tera Expert

Hi All,
I wanted to highlight the field(for example: Number) using a specific color. For that, I used the g_form.getControl.style in client script to achieve the result. i can see the field highlighted in the backend, but not in workspace. I wanted the fields to be highlighted in workspace as well. Is there any way to do it??

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Madhav Rao D V g_form.getControl is not supported in workspace. Same is mentioned in this support article as well https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0855260

 

 

View solution in original post

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@Madhav Rao D V g_form.getControl is not supported in workspace. Same is mentioned in this support article as well https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0855260

 

 

Madhav Rao D V
Tera Expert

@Sandeep Rajput 
To summarize based on the article, Any change that is made using g_form.getControl() will not be reflected in agent workspace.
Thanks for your inputs.

Yes, your assumption is correct. Also, please mark my answer correct since it highlights the root cause of g_form.getControl not working in workspace.

I do wonder if Servicenow appreciate what people had written in the past that made things like this nice and useful for the customer and how customers still want it in the nice new snazzy workspaces, and quite frankly, are making it impossible to do it going forwards.