I’m trying to get a lines value on field changed and for some reason it is grabbing the value prior to the change. So as an example, say I have a field called notes and it already holds the value ‘foo,’ I then change it to ‘test’ but on the fieldChanged script it grabs the value ‘foo’ not ‘test.’ Can anyone explain why this would happen?
Code:
function fieldChanged(scriptContext){
var eventRecord = scriptContext.currentRecord;
var fieldId = scriptContext.fieldId;
var lineNum = scriptContext.line;
var fieldValue = eventRecord.getSublistValue({
sublistId: ‘custpage_eventsublist’,
fieldId: fieldId,
line: lineNum
});
This is a cached copy. Click here to see the original post.