- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2017 02:59 AM
How to validate start date should not be greater than end date using business rules
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2017 04:18 AM
Here is the example
You need to update the field names
if (gs.dateDiff(current.end_date.getDisplayValue(), current.start_date.getDisplayValue(), true) < 0)
return;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2017 04:18 AM
Here is the example
You need to update the field names
if (gs.dateDiff(current.end_date.getDisplayValue(), current.start_date.getDisplayValue(), true) < 0)
return;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 01:04 AM
Create a business rule on issues if the contract end date is in past then display an message “Contract of this caller is expired”.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 11:56 AM
Can i get a client script code for validating time
if the user chooses start time greater than end time(hh:mm ) then it has to notify end time should be greater than start time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 06:25 AM
Using Client Script
can i get a client script for The start date should not be greater than Current date and time?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2022 11:47 AM
Hi,
You can try creating new onChange client script on start date field with below code
var todayDate = formatDate(new Date(), g_user_date_time_format);
if(newValue < todayDate){
g_form.addErrorMessage("start date cannot be in past");
g_form.clearValue("start_date");
}
mark my response as correct or helpful if applicable