I'm running a client script for some validation before the save of an Assembly Build. I am validating some information about the lot number/quantity chosen, so I need to get the inventorydetail subrecord from the body field.
Here is a snippet of code:
var inventoryDetailSubrecord = scriptContext.currentRecord.getSubrecord({ fieldId: 'inventorydetail' }); console.log(JSON.stringify(inventoryDetailSubrecord)); var lineCount = inventoryDetailSubrecord.getLineCount({ sublistId: 'inventoryassignment' });My console shows the proper subrecord information. However, the line where I try to get the lineCount throws an error "referenceError: options is not defined".If I try the same code in SS1 from the console it works properly.Anyone else seen this or know how to get around this?