UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 02:51 AM
Hi!
I am trying to create a functionality for a button 'reject': when clicked a "reason" field should appear (and is mandatory).
Then when I click again, the "amount" field should be set to 0, and if the field "reason" is empty I should have an error message.
Here is my current script that does not work:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 02:57 AM
Hi @hadron_collider ,
Whatever, you are trying to achieve using UI action can be done using UI Policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 03:03 AM
I agree with Sandeep to use UI policy.
You are showing the field on click of UI action so user would not have entered anything prior to this so it makes no point in making it mandatory on UI action click
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 03:15 AM
the point is: the record can be rejected only when 'reason' field is filled in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 04:56 AM