- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2023 04:18 AM
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2023 05:37 AM
I suggest you to use UI Policy instead of this script
Create UI Policy with condition as below:
"startdate" "is less than" "48" "Hours" "before" "enddate"
Create UI Policy action with field as enddate and Clear value as checked (Keep Mandatory, Visible and Read Only as leave alone)
Go to Script tab and do the following
1) Check Run script check box
2) Write below script under Execute if true
function onCondition() {
g_form.showFieldMsg("fieldname","End date should be 48 hours after start data","error");
}
Palani

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2023 05:37 AM
I suggest you to use UI Policy instead of this script
Create UI Policy with condition as below:
"startdate" "is less than" "48" "Hours" "before" "enddate"
Create UI Policy action with field as enddate and Clear value as checked (Keep Mandatory, Visible and Read Only as leave alone)
Go to Script tab and do the following
1) Check Run script check box
2) Write below script under Execute if true
function onCondition() {
g_form.showFieldMsg("fieldname","End date should be 48 hours after start data","error");
}
Palani