Is it possible to create styles for the oob fields?

SAS21
Tera Guru

I have a requirement to add style with left alignment for 'Created' and 'Updated' fields .
It is throwing me an error as invalid style record even though it is in the current application scope.
Is it possible to create styles for the oob fields?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@SAS21 

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_1-1747199746439.png

 

AnkurBawiskar_2-1747199770170.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

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@SAS21 

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_1-1747199746439.png

 

AnkurBawiskar_2-1747199770170.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

Erica407Den
Kilo Contributor

Hello!

Yes, you can style OOB fields like 'Created' (sys_created_on) and 'Updated' (sys_updated_on) in ServiceNow within your application scope. The "invalid style record" error likely stems from incorrect table or element names, the style being in the wrong scope, conflicting styles, or an invalid CSS definition (text-align: left;). Ensure you create the style record with the correct table, element (sys_created_on or sys_updated_on), the desired style, and confirm it's in your application scope. Check for existing styles that might be overriding your new one. 

Omender Singh
Tera Guru
  • Nope, you can’t style OOB system fields like Created and Updated using standard Style records.
  • Yes, you can left-align them visually using a client script as a workaround( but it work on form only not list ).
  • Keep in mind these are system-managed fields, so don’t try to modify them from scope styling — it’ll always throw an error.

Sriramachandra
Tera Guru
background-image: url('/images/icons/vip.gif');
background-repeat: no-repeat;
background-position: 98% 5px;
padding-right: 45px;
color: black;
font-weight: bold;
text-shadow: -12px 0px 2px red;