- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-15-2024 02:00 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-15-2024 02:56 AM - edited ā05-15-2024 02:58 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-15-2024 02:28 AM
Absolutely no idea what you are asking. Please provide a real question with all required details and screenshots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-15-2024 02:39 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-15-2024 02:56 AM - edited ā05-15-2024 02:58 AM
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