How to set custom value for sys_created_on field?

TT3
Kilo Guru

For some business situations, we have to make some ad-hoc entries in a table. These entries should have custom value for sys_created_on field. I tried followings:

1. Inactive the ACL *.created_on: Didn't worked.

2. Return true from the ACL *.created_on script section: Didn't worked.

Any idea?

 

5 REPLIES 5

dianemiro
Kilo Sage

Hello,

It is not advisable to modify system fields functionality. But if you really need to do so, may I know how do you want to set the custom value for the sys_created_on field?

Regards,
Diane

I would like to set the value by script and there can be some business logic like 3 days past form current date. Thank you.

@TT 

var gdt = new GlideDateTime(current.sys_created_on);
gdt.addDaysUTC(-2);
current.sys_created_on = gdt;
Best Regards
Aman Kumar

Hi @TT 

Is your issue resolved?


Feel free to mark correct, if your issue has been resolved, so it ends up in solved queue.

Will be helpful for others looking for the similar query.

Best Regards
Aman Kumar