Todd Juenemann
05/23/2024, 3:52 PMEric B
05/23/2024, 3:59 PMTodd Juenemann
05/23/2024, 4:05 PMehcanadian
05/23/2024, 4:13 PMruntime.User
does not have a `roleIds`property. It has roleId
which is the role the user is currently using.Todd Juenemann
05/23/2024, 4:17 PMehcanadian
05/23/2024, 4:39 PMvar userRoleId = currentUser.roleId;
if (userRoleId === 1127))
Todd Juenemann
05/23/2024, 4:47 PMehcanadian
05/23/2024, 4:53 PMif(userRoleId == 1127)
instead. Double vs triple equals. You'd also need to be viewing or editing the record using the role with that id.Todd Juenemann
05/23/2024, 4:56 PMehcanadian
05/23/2024, 4:59 PMTodd Juenemann
05/23/2024, 5:00 PMTodd Juenemann
05/23/2024, 5:09 PMTodd Juenemann
05/23/2024, 5:22 PMehcanadian
05/23/2024, 5:23 PMcontext.type === context.UserEventType.VIEW....
is forehcanadian
05/23/2024, 5:25 PMlog.debug('TITLE', value)
Todd Juenemann
05/23/2024, 7:13 PMNElliott
05/27/2024, 7:27 AMcurrentRecord.getSublistField({
sublistId: 'item',
fieldId: columnId,
line: i
}).isDisabled = true;
try this:
let thisField = context.form.getSublist('item').getField(columnId) || '';
if(thisField !==''){
thisField.updateDisplayType({displayType: 'disabled'}) : '';
}
Also note, log.debug does not "pop a message" you will see it in the script logs. (make sure your logging level on the deployment is set to "DEBUG")