- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 10:14 AM
I am trying to understand why a date/time field that is currently on layout will not allow me to change the date to a date and time in the past. Is there a way to disable this so that I can import offline records and overwrite the date/time field.
I have checked UI Policies, Business Rules and Client Scripts and cannot find where this is enabled.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 04:51 PM
Hi, if the field is custom IE starts with u_, then it would seem to be custom which means the community has no visibility of your configuration and how\why this is occurring.
If the field reverts after you click save then the most likely cause is a before update business rule,
I would copy the name of the field IE u_fieldName
Open 'Studio' and select any application scope (the scope is mandatory but not important)
Select Search > Code Search
and search for your field name with no table selected and Search in all applications = true
Hopefully that will help you find the cause?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 10:37 AM
Hi @JbDevelopsSnow , Could you please elaborate for which table this is happening. Is that a custom table or OOTB.
Thanks,
Pratik Malviya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 02:06 PM
Hi, unfortunately your post does not make your configuration or issue clear.
Is the datetime field one of the system timestamps IE sys_created_on or sys_updated_on?
if yes, you can only set these fields if you utilize autoSysFields(false) in global scope script
GlideRecord | ServiceNow Developers
or disableAutoSysFields() in a scoped app.
GlideQuery | ServiceNow Developers
If this is not your issue then please update this thread with clear and detailed information of your configuration\process\problem, so that the community can better understand and assist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 02:42 PM - edited 02-11-2024 02:42 PM
Hi Tony, thank you for your reply. I have a date/time field on layout, whenever I try to update that field to another date and click save, the field automatically reverts the date back to the current date. I need to turn off this logic in order to import data with creation dates before today. This field seems to be a custom field since it starts with a u_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 04:51 PM
Hi, if the field is custom IE starts with u_, then it would seem to be custom which means the community has no visibility of your configuration and how\why this is occurring.
If the field reverts after you click save then the most likely cause is a before update business rule,
I would copy the name of the field IE u_fieldName
Open 'Studio' and select any application scope (the scope is mandatory but not important)
Select Search > Code Search
and search for your field name with no table selected and Search in all applications = true
Hopefully that will help you find the cause?