code-snippets
code-snippets copied to clipboard
Making the particular variable Read only in the RITM table
How to make the particular variable field as "Read Only" in RITM table on type as "onLoad" I have attached the code below,
function onLoad() { // Specify the variable name 'groups' var variableName = 'groups';
// Get the value of the 'groups' variable
var groupsValue = g_form.getValue(variableName);
// Check if the 'groups' variable exists and is not empty
if (g_form.hasField(variableName) && groupsValue !== '') {
// Make the variable field read-only
g_form.setReadOnly(variableName, true);
}
}
This is my code, but it doesn't works