Announcing the Global SNUG Board of Directors. Learn more here

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

Dynamic filter using script include - Conversion problems

tiagomacul
Mega Sage
Mega Sage

Continuing discussion:

Dynamic filter using script include as reference

  1. var appLogin = Class.create();  
  2. appLogin.prototype = Object.extendsObject(AbstractAjaxProcessor, {  
  3.  
  4. filterMe: function(){  
  5. var vuserid = gs.getUserID();  
  6. vReturn = "";  
  7.       vIsTrue = this.isTrue();  
  8. if (vIsTrue== false)  
  9. {    
  10. vReturn = vuserid;}  
  11. else  
  12. {  
  13. vReturn = this.GetMyBoss();  
  14.  
  15.  
  16. }  
  17. return vReturn;  
  18. },  
  19.  
  20.  
  21.  
  22. isTrue: function(){  
  23. var vuserid = gs.getUserID();  
  24. var ObjUser = new GlideRecord('sys_user');  
  25. ObjUser.get(vuserid);  
  26. var vistrue= ObjUser.u_istrue;  
  27. return vistrue;  
  28. },  
  29.  
  30. GetMyBoss: function(){  
  31. var vuserid = gs.getUserID();  
  32. var ObjUser = new GlideRecord('sys_user');  
  33. ObjUser.get(vuserid);  
  34. var vmyboss= ObjUser.u_myboss;  
  35. return vmyboss;  
  36. },  
  37.  
  38.  
  39.  
  40. type: 'appLogin'  
  41. });  

I'm getting some issue about conversion.

Obs:

Shishir Srivastava

1 ACCEPTED SOLUTION

Hi Shishir Srivastava ,



Thanks, we were getting deny on read permission in a custom table (GetMyBoss function).



Thank You


View solution in original post

4 REPLIES 4

Shishir Srivast
Mega Sage

Please check if this helps:



var appLogin = Class.create();


appLogin.prototype = Object.extendsObject(AbstractAjaxProcessor, {



filterMe: function(){


var vuserid = gs.getUserID();


var vIsTrue = this.isTrue(vuserid);


if (vIsTrue == 'false')  


return vuserid;


else


return this.GetMyBoss();


},



isTrue: function(vuserid){


var ObjUser = new GlideRecord('sys_user');


ObjUser.get(vuserid);


return ObjUser.u_istrue;


},



GetMyBoss: function(vuserid){  


var ObjUser = new GlideRecord('sys_user');


ObjUser.get(vuserid);


return ObjUser.u_myboss.toString();


},


type: 'appLogin'


});


Hi Shishir Srivastava ,



Thanks, we were getting deny on read permission in a custom table (GetMyBoss function).



Thank You


Can you please let us know what is the error also can you please check if the user who is trying to access u_myboss field has a read permission? or is he there in that role which is with read ACL of u_myboss field?


That's the point, didn't happens.



I change the sample code on community my u_myboss   field is a u_table.u_myboss, and my solution was create a new field u_myboss in sys_user. (faster solution), I'm thinking it's a ACL permission on u_table.



Did you know, Who is running Script include when we are using dynamic filter? It is server side or client side?




Thank You