custom Field not hiding in agent workspace but hiding in backened view of workspace

MOHIT BHAMBRI
Tera Contributor

Hello ,

 

Their is one custom Mandatory field created as (u_subcategory) and i have applied a onLoad Client Script to be hidden for a specific condition , And i have checked in backend view of workspace it's hiding ,but if i am opening the same in agent workspace and checking it, it's showing the field.

 

@Ankur Bawiskar @Chuck Tomasi If you could help please..

Agent Workspace--(Still visible on agent workspace)

MOHITBHAMBRI_0-1684812936541.png

Workspace View from native--(Hiding it from here)

MOHITBHAMBRI_2-1684813414743.png

Client Script--

MOHITBHAMBRI_3-1684813443894.png

 

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@MOHIT BHAMBRI 

if you want to show and make it mandatory then why not use the view name in client script directly -> uncheck global check box and type the view name

AnkurBawiskar_0-1684846241154.png

 

OR

you can also use UI policy and select the view name

AnkurBawiskar_1-1684846274869.png

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Hi @Ankur Bawiskar ,

 

I have used that too, but that didn't work for me so then i try to use getview() method and validate it.

@MOHIT BHAMBRI 

can you share that client script or UI policy which you created?

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

@Ankur Bawiskar the below script is working fine in workspace view from backened/native but not working in Agent workspace.

MOHITBHAMBRI_0-1684910443321.png

And have even checked by commenting the getview and also verified from unchecking it from global and providing workspace view .But then also it's not able to hide the field.

 

Your response is highly appraisable !!