- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 05:53 AM
Hello together,
this post describes the way how to validate the start and end date. https://www.servicenow.com/community/developer-articles/two-quick-steps-to-achieve-end-date-after-st...
I tried this for change_task table. Additional to (out of the box) existing Client scripts I added the 3 new one for change_task with the same code like the existing for change_request (because the field names are the same).
My problem is, that in classic view everthing looks good, also when I open the view for SOW and Workspace via Classiv view.
But when I switch to the real SOW and Workspace view, I dont get any messages when my end date is before the start date.
Does someone have an idea, why?
Best regards Nicole
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 12:23 AM
Hello Mark,
it was only in my PDI, I didnt delete something in our dev/prod system 😉 But thanks for the hint.
In the meantime, I found another solution and code. I only use now one Client script. The OOTB Client script and UI Script I switched back to original one. Message was created in sys_ui_message table as well. Thanks and best regards Nicole
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 06:54 AM
Do you have your 'isolate script'field on the client script set to true?
Is UI type set to 'all'?
Is global set to true?
If all of this doesn't help, can you share your script?
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
01-30-2024 11:47 PM
Hello Mark,
thanks for the info and for your help. I tried it, but in SOW and CSM Workspace nothing happened 😞
I have the following scripts:
UI Script (was OOTB already there). I deleted the old UI Script and created a new one with UI Type "All"
Client Script "Date Validation Load" was OOTB already there. I deleted the old Client Script and created a new one with UI Type "All"
3 Client Scripts which I created new, now with all this points what you mentioned.
"BASActual Start date onChange validation"
"BAS Actual End Date onChange validation"
"BAS Actual Start/End Dates Validation"
Best regards Nicole
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 06:46 AM
You deleted old scripts and added new ones? That can get you into some trouble when in an upgrade the scripts get reintroduced. Best practice is to adjust the OOB script(s) so any change by an upgrade can be validated. Old best practice can also be used: inactivate old scripts and create new ones.
Can you undelete the OOB scripts to see if they worked or not? If this has something to do with the workspaces, you can go to ServiceNow is OOB objects don't work (because that would also explain why yours don't work while they are the same).
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
02-01-2024 12:23 AM
Hello Mark,
it was only in my PDI, I didnt delete something in our dev/prod system 😉 But thanks for the hint.
In the meantime, I found another solution and code. I only use now one Client script. The OOTB Client script and UI Script I switched back to original one. Message was created in sys_ui_message table as well. Thanks and best regards Nicole