$sp.getForm specified view for user with no roles

Giles Lewis
Giga Guru

If a user has no roles, then $sp.getForm always seems to return the "ess" view, regardless of the view parameter.

Is there a system property or something that I can set that will cause $sp.getForm to return the requested view for a user with no roles?

 

1 ACCEPTED SOLUTION

Giles Lewis
Giga Guru

Response from ServiceNow: If there is a view named 'ess' on a table, as per the platform logic the non-roled users will be redirected to this view.

There does not appear to be any way to alter the behavior of $sp.getForm in this context.

View solution in original post

2 REPLIES 2

SatheeshKumar
Kilo Sage

Hi Giles,

 

Can you try the below?

Pass the view name as param

 

getForm(string table, string sys_id, string query, string view)

 

 

(function() {
  /* populate the 'data' object */
  /* e.g., data.table = $sp.getValue('table'); */
	
	data.f = $sp.getForm('incident', "a57fb269dbac0010b6db8e4748961947",'','cxs_popup');

gs.addInfoMessage(data.f);

})();

 

 

 

-Satheesh

Giles Lewis
Giga Guru

Response from ServiceNow: If there is a view named 'ess' on a table, as per the platform logic the non-roled users will be redirected to this view.

There does not appear to be any way to alter the behavior of $sp.getForm in this context.