Read only after first SAVE of the form

aahitha2
Mega Expert

Hi All,

     I have one editable field(Company - reference field) in the form, while filling the new form it should deplay as editable and after saving the form 1st  that ( company field) should become read only.

@ How can i achieve this please??

 

Thanks,

Aahitha

1 ACCEPTED SOLUTION

ok yes,

now you need to do some changes in your ACL

you doesn't need to write answer=false in script section,please remove this,

and also uncheck admin override(if you want).

View solution in original post

17 REPLIES 17

Pranay Tiwari
Kilo Guru

Hi,

ACL is the best approach for that,UI policy work only form level so it's not a best practice.

so as per your requirement you need to create an ACL for that..

 

create an write operation ACL ON Table_name.field_name

the write an simple script in script section as below..

 

if(current.isNewRecord()){
answer=true;
}

it will work perfectly..

 

Mark correct or helpful if it helps you.

 

 Warm Regards,

Pranay Tiwari

 

Hi All, Thank you for your valuable replies.

BUT..

1). below on is new incident form , in that form company is editable by default. like below 1st attachment

2)After filling all mandatory fields and after saving that form , company should be ready only for next time updating that incident.

 

3).i written write ACL, on incident like.. incident.company and in same script i written as u said

     

if(current.isNewRecord()){
answer=true;
}

     but after saving the 1st time, if i will open again this field is not becoming read only...

 

PLease help

this doesn't work for me. Can you please help!

aahitha2
Mega Expert

Hi All, Thank you for your valuable replies.

BUT..

1). below on is new incident form , in that form company is editable by default. like below 1st attachment

2)After filling all mandatory fields and after saving that form , company should be ready only for next time updating that incident.

 

3).i written write ACL, on incident like.. incident.company and in same script i written as u said

     

if(current.isNewRecord()){
answer=true;
}

     but after saving the 1st time, if i will open again this field is not becoming read only...

 

PLease help

I think you miss something,

it work's in my incident table,

please share the screenshoot of your ACL.