Set all fields to read only when a UI Action button "Finalized" is clicked.

bwinters
Kilo Contributor

I want to lock down a form and all related fields to read only when a UI action button "finalized" is clicked. 

This is the current script  on the UI action that is not doing this.

//script

gs.addInfoMessage('Your audit is now finalized!');
current.active = false;
current.finalized = true;
action.setRedirectURL(current);
current.update();

//end script

1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

Use below to make field read only in UI action

 

g_form.setReadOnly('number', true);

 

Regards,

Sachin

View solution in original post

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

Use below to make field read only in UI action

 

g_form.setReadOnly('number', true);

 

Regards,

Sachin

Naveen63
Tera Contributor

Hi,

 

Can you more explain your requirement? what is the mean by "lock down a form"?

 

Regards,

Naveen

 

Dinesh Nikam
Mega Guru

Hello,

To make all Fields Read only when Is Finalized Check Box is True 

You have to create Write 'ACL' on your Table.

Attaching Screen shot for your Reference.

find_real_file.png

Thank you.

 

PLEASE mark my ANSWER as CORRECT if it served your purpose.