getEditableFields() is not working for reference field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2016 05:10 AM
Hi,
getEditableFields() is not working for reference field.
Kindly help if I missing anything or I have to add anything.
Regards
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2016 05:16 AM
One thing to add, all are mandatory.
How can I make all mandatory field for all table also read only through client script and on load.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2017 05:14 AM
Hi Rajesh,
Even I got the same problem.
I solved the problem with the below code, you will get all the fields which are editable and reference as well.
g_form.elements.forEach(function (e, i) {
g_form.setMandatory(e.fieldName, false);
g_form.setReadOnly(e.fieldName, true);
});
thanks
Madhava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2017 01:43 AM
Hi rajesh can u pls try this script
For ur requirement its working fine in my instance am currently using the Istanbul release
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var f=g_form.getEditableFields();
for(var x=0;x<f.length;x++){
g_form.setReadOnly(f[x],true);
alert('all fields are read only');
}
}