How to get alert/warning message (alert message) when manager approves after planned start date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 10:42 PM - edited 08-20-2024 09:10 PM
Hello Everyone,
I have below requirements, please suggest me
> Create warning message when manager approves after planed start date/time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 02:04 AM
Please don't tag people in questions!
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 02:56 AM
@Vinod S Patil use g_form. addErrorMessage('message');
…………………………………………........................................................................................
Please Mark it helpful 👍and Accept Solution ✅!! If this helps you to understand.
…………………………………………........................................................................................
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 04:37 AM
@Satishkumar B
g_form. addErrorMessage('message'); it will be in the loop but before that what condition we need to add in client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 01:54 PM
@Vinod S Patil Try BR
if (current.approval == 'approved' && new GlideDateTime().getNumericValue() > new GlideDateTime(current.planned_start).getNumericValue()) {
gs.addErrorMessage('Warning: The approval is after the planned start date/time.');
current.setAbortAction(true); // Prevents the approval from proceeding
}