I have a requirement to add style with left alignment for 'Created' and 'Updated' fields

8291teal
Tera Contributor

I have a requirement to add style with left alignment for 'Created' and 'Updated' fields 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@8291teal 

I just now replied to similar thread.

Is it possible to create styles for the oob fields? 

sharing it again here

I tried creating field style on Created field in HR Core Scope with background red and it doesn't work.

I believe you can add field style but it doesn't reflect on OOTB system fields

 

AnkurBawiskar_0-1747201198906.png

 

 

AnkurBawiskar_1-1747201198911.png

 

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Omender Singh
Tera Guru

 

  1. Not Allowed via Style Records:

    • You cannot add UI Style records to Out-of-the-Box (OOB) fields like sys_created_on or sys_updated_on.

    • These are system fields and are protected.

  2. Why the Error Happens:

    • Style records can't target system fields across scopes due to scope protection and system ownership.

    • Even if you’re in the same app, these fields belong to global.

  3. Workaround:

    • Use a Client Script (onLoad) to apply CSS-based left alignment:

      g_form.getControl('sys_created_on').style.textAlign = "left";
      g_form.getControl('sys_updated_on').style.textAlign = "left";
  4. No Impact on List Views or Workspace:

    • This workaround only works on form view, not in list or workspace.

  5. Conclusion:

    • No, you can’t style OOB system fields using UI Styles.

    • Yes, you can visually adjust alignment using client-side scripting.