On Load client script is not working to make checkbox true if another date field is not empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 12:02 AM
Hi All,
I am new to ServiceNow and facing an issue, I have written an on load client script to make checkbox true if other date field is not empty.
As per my understanding my code is correct but is is not executing.
ON Load Script -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 03:55 AM
@Anand Kumar P I want to save the data in database what can I do to achieve it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 12:14 AM
@abhaysingh98 Try In client side with g_form.save() if it not works . You have to convert it to before business rule then only it will saves to database.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 05:18 PM
abhaysingh98 try this
g_form.setValue('u_check_box', 'false');
note on the single quotation marks. I faced this issue recently and that solved my problem. I don't understand why but as long as it fixed my issue!