I have a table name quotation and have a lookup field name code. I want to make this lookup field(code) readonly after insert the record, so I try to add this code to my quotation-dv.js but it didn't work.
if($j('[name=SelectedID]').val().length) {
$j(function(){
$j('#code-container').select2('readonly', true);
})
}
Strange thing is when I try this code in my chrome console, it does work. But there is another problem, user still can use the + button to add new record to code lookup field and it auto change the value to the newly add record. Is any way to hide/make this button readonly also?
Make lookup field readonly after insert
Make lookup field readonly after insert
- Attachments
-
- Capture.PNG (8.6 KiB) Viewed 1263 times