Unable to make field read only

Alex2506
Tera Expert

Hi, 

 

I'm trying to make planned start date ('start_date') read only on a project task ('pm_project_task'). I have a UI policy to do this for other fields, all working fine apart from start date. Tried via script etc nothing seems to work.

 

The only way I can do this is via the write ACL on that field. I add a condition to it and this makes it read only. I want to try and avoid this if I can.

 

What's weird is that, when I make that ACL inactive, the UI policy still doesn't apply to that field so something else must be happening here. Can anyone help? Seems simple but can't quite work it out.

 

Thanks! 

7 REPLIES 7

Hi @Rakesh18081

 

There's no calculated value but there's a default value of:

javascript:new GlideDateTime().getDisplayValue()

Also has this in the Attributes field:

field_decorations=rollup_calc_field_decoration

Thanks!

 

@Alex2506 

Is it editable for you?

Out of the box the field is already read-only when new/existing project task is opened and is populated with the current date/time

it's because of this OOTB Field level WRITE ACL

AnkurBawiskar_0-1749120900152.png

Please check any client script or UI policy on parent table (planned_task) which is blocking your logic due to Inherited checkbox

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Alex2506 

did you try onLoad client script?

Did you search in some UI script?

Did you create a UI policy with order as 1000 and see if it makes it readonly?

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