The CreatorCon Call for Content is officially open! Get started here.

Declarative Action opening a new record but field is readOnly

davilu
Mega Sage

Hi Experts, our team has a Related List declarative action that opens a new record with some column values auto-populated.  Not sure if this is the correct way to do this, but found some community posts showing this particular method:

 

function onClick() {
	g_aw.openRecord('sn_hr_core_corrective_action_noa_cases', -1, {
		"query": "u_helpdesk_case=" + g_form.getUniqueValue() + "^u_noa_code=" + g_form.getValue('u_noa_code') + "^u_effective_date=" + g_form.getValue('u_effective_date')
	});
}

 

When logged in as an admin, the form appears as expected.  The NOA Code and Effective Date columns are configured to be Read Only:

davilu_0-1758664281960.png

 

But when impersonating an end user, the entire form is Read Only:

davilu_1-1758664339441.png

There are no client scripts, UI policies, ACL's that are causing this.  The only thing we can think of is this declarative action, but unsure why this would be happening.  Any suggestions?

1 ACCEPTED SOLUTION

davilu
Mega Sage

Hey Everyone, I was able to fix it through ACL

 

There is an acl that refers to this system property: glide.sm.default_mode which is set to deny OOTB and we actually can't change it to "allow".  Looks like this property blocks access in the absence of ACL's.  Once we created a create ACL for table.*, the form opened up.  Thanks!

 

View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@davilu 

how does the form look when the non-admin opens the table using table.LIST ?

If it's readonly it means Table.None WRITE ACL is blocking.

I could see lot of OOTB Related List Actions using g_aw.openRecord so it should work

Also did you check any custom UI policy or client script is making those fields read-only?

AnkurBawiskar_0-1758721974255.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

@davilu 

Hope you are doing good.

Did my reply answer your question?

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

davilu
Mega Sage

Hey Everyone, I was able to fix it through ACL

 

There is an acl that refers to this system property: glide.sm.default_mode which is set to deny OOTB and we actually can't change it to "allow".  Looks like this property blocks access in the absence of ACL's.  Once we created a create ACL for table.*, the form opened up.  Thanks!