set field as read-only after record is created
- D Oliveira
- AppGini Super Hero
- Posts: 348
- Joined: 2018-03-04 09:30
- Location: David
set field as read-only after record is created
how to set the 'Work Order ID' field to read-only after first the record is created?
Re: set field as read-only after record is created
Hello D Oliveira,
here's an idea of what you can do ,
1- in before update hook function , you should retrieve the value you want it to be read only,
and after update reset it with the retrieved value , so you will guarantee that this value won't be changed
here's an idea of what you can do ,
1- in before update hook function , you should retrieve the value you want it to be read only,
and after update reset it with the retrieved value , so you will guarantee that this value won't be changed
Re: set field as read-only after record is created
2- in tablename-dv.js
check if selectedID has a value which means that is not a new record
add $j("yourelement").prop({ readOnly: true });
i hope this idea would help you
Regards ,
Reham
check if selectedID has a value which means that is not a new record
add $j("yourelement").prop({ readOnly: true });
i hope this idea would help you
Regards ,
Reham
Re: set field as read-only after record is created
Hello D Oliveira,
sorry for the first point , it's not true
i have another correct one ,
in the before update function there's a data array with the new values and the record id
1- check if the record id is that one you want it to be read only and if so
2- you will use the record id to retrieve old values
3- will will set the data array values(new values) with retrieved values (old values) that you want it to be readonly
sorry for the first point , it's not true
i have another correct one ,
in the before update function there's a data array with the new values and the record id
1- check if the record id is that one you want it to be read only and if so
2- you will use the record id to retrieve old values
3- will will set the data array values(new values) with retrieved values (old values) that you want it to be readonly