Condition is always on true

Suyash Joshi
Tera Contributor

Hello Everyone,

while creating a UI action I faced an issue with auto generated button when condition is false.
I want to select a caller if the caller is in 'openspace' group UI action button are visible but when I test it and run on other member it still display the button.
Script :  u_caller == gs.getUser().isMemberOf('openspace')
Anyone help me on urgent basis.
Regards,
Suyash

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi @Suyash Joshi ,

If your requirement is to show button only when caller is member of 'Openspace' then you can use below in your Ui Action condition:

gs.getUser().­getUserByID(current.caller_id).isMemberOf('Openspace')

 

Replace caller_id field by correct field name as per your requirement (eg. u_caller)

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

17 REPLIES 17

Hi @Suyash Joshi current object refers to the current record , without current your condition will not evaluate correctly,

current.fieldname // refers field on the current record which user opens

Regards
Harish

But when I run using current it is not execute and without It will generate the button

Hi @Suyash Joshi 

 

What @Harish KM  has suggested that should work. Can u paste a snip of what u have added?

 

Thanks,

Danish

 

 

Hi @Suyash Joshi what is the field name? and how are you testing it? Are you impersonating the user who is member of that group and also is he present in caller field?

Regards
Harish