ui Action Condition not matching

smkreddy
Tera Contributor

HI Team ,

in incident form i need to display ui action, with bello query 

encoded query : caller_id=ec4b0a281b18ca103916c88b274bcb26^correlation_idSTARTSWITH1PR0^sys_updated_by!=System Administrator^short_descriptionSTARTSWITHSocial Impersonation^ORshort_descriptionSTARTSWITHApp Impersonation^ORshort_descriptionSTARTSWITHWeb Impersonation^ORshort_descriptionSTARTSWITHAccount Takeover

its not working 

1 ACCEPTED SOLUTION

Hi,

I'm assuming this is for learning purpose 

So, first thing to understand is that UI Action conditions are always evaluated on the server side, even if the ui action is Client.

So the condition for short description could be

current.short_description.indexOf('internet') == 0  //evaluating against a string ensuring it is present and at the start

OR

current.short_description.startsWith('internet') 

 

And the person, usually you don't want to hardcode this for a single user, in most cases it is like if the logged in user is the Assigned to or Called on the record. So for that you can use

current.assigned_to == gs.getUserID //this will check the logge din user against the user in assigned to field

 

Hope this helps

 

-Anurag

View solution in original post

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Absolutely no idea what you are asking. Please provide a real question with all required details and screenshots.

smkreddy
Tera Contributor

Hi @Maik Skoddow ,

I created one ui action on incident table,

this Ui action need to visible  caller is  "abultuter",
and short description start with email, or start with internet. 

Hi,

I'm assuming this is for learning purpose 

So, first thing to understand is that UI Action conditions are always evaluated on the server side, even if the ui action is Client.

So the condition for short description could be

current.short_description.indexOf('internet') == 0  //evaluating against a string ensuring it is present and at the start

OR

current.short_description.startsWith('internet') 

 

And the person, usually you don't want to hardcode this for a single user, in most cases it is like if the logged in user is the Assigned to or Called on the record. So for that you can use

current.assigned_to == gs.getUserID //this will check the logge din user against the user in assigned to field

 

Hope this helps

 

-Anurag