Check if field is read-only or mandatory in ATF server side script?

Alice18
Kilo Contributor

Hi,

 

I want to validate that a task variable field is read-only using ATF script, is that possible? I also want to validate that a field is mandatory upon closure of the task, but seems like the mandatory check is not available in server side script.

 

Thanks in advance!

Alice 

5 REPLIES 5

Jace Benson
Mega Sage

Yes you can do that.

Docs: https://docs.servicenow.com/bundle/london-application-development/page/administer/auto-test-framewor...

 

Service Catalog test step: Variable State Validation is the step you want to use.

oh wait, you said "server-side script"
That would be complicated unless you're using the "mandatory" checkbox on the variable.  If you're using UI policies or Client scripts you'd have to somehow evaluate them server side. 

Can we validate the on the table ,on the list view, whether for the particular user some columns are editable or not?

But this can be validated only for the Catalog Items, not for the other tables?