Make fields read only after submitting the form through UI policy only for new record

pavan patil
Tera Contributor

Hi ,

I want to make field read only after submitting the form through ui policy only for new record , can someone assist how to achieve this functionality

Thanks

Pavan

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

Hi @pavan patil 

sorry, but I don't understand this. After submitting the form for a new record you return to the previous page (in most of the cases a list view). So why do you want to make a field read only then?

Or should the field remain read-only when the record is opened again?

Kind regards
Maik

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

This can be achieved by adding a condition which is unique and only appears after the form is submitted and not on a new form.

 

For ex:- If on a Incident form when trying to create new record the number field is empty but after submit the number field gets populated the UI policy condition will be when number field is not empty, then make the field readonly.

 

But in UI policy if you are willing to use the script part then you can use the below to check if the record is new or not

g_form.isNewRecord()

Jared Wason
Tera Guru

Hi,

 

I am not totally sure what you are trying to accomplish, but maybe something like this, where after submitting a new incident the impact and urgency fields are set to read only. First I created a UI policy on the incident table with the condition of 'State is New'. Make sure to save the UI policy so you can add your UI policy actions. Then I created two UI policy actions for impact and urgency fields setting 'Read Only to True'. 

find_real_file.png find_real_file.png

find_real_file.png

shloke04
Kilo Patron

Hi,

Can you explain your use case what actually you are trying to achieve?

Also I am confused you want to make it read only for New Record, but once you have submitted the record, it is no longer a new record. Both of your conditions are conflicting with each other.

Please share more details to assist you further.

 

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke