How to validate start date should not be greater than end date using business rules

gomathysanjana
Mega Expert

How to validate start date should not be greater than end date using business rules

1 ACCEPTED SOLUTION

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;


View solution in original post

9 REPLIES 9

Sanjeev Kumar1
Kilo Sage

Hi,


Before insert you need to write BU.



if you need code let me know.


madanm7786
Mega Guru

Hi,



There is OOB business rule, "Planned Start/End Date validation" in change_request table.


Taking a reference of this BR you can configure your own BR for any table.




Thanks,


Maddy


amlanpal
Kilo Sage

Hi Gomathy,



Please have a look at this thread. It might be helpful for you:


How to write a date validation script in server side?



I hope this helps.Please mark correct/helpful based on impact



gomathysanjana
Mega Expert

Using DateDiff() function I have to write business rule