KnotKnick
01/04/2023, 8:34 PMvar result = JSON.parse(context.values[0]);
log.debug('Result', result);
The logged result looks something like this:
"recordType":"customrecord_vrt","id":"16","values":{"name":"ABC Report","created.file":"11/29/2022 4:07 pm","internalid.file":{"value":"12345","text":"12345"}}}
In the next step, I am trying to access internalid.file
from the result. I have tried all methods that I know, but I am still not able to access it.
Some of the steps I have taken to get internalid.file
are:
var fileId = result.getValue({ name: 'internalid', join: 'file' });
var fileId = result.values.internalid.file.value;
What am I missing here?battk
01/04/2023, 8:57 PMresult.values
has 3 keys
name
created.file
internalid.file
battk
01/04/2023, 8:58 PMresult.values.internalid
is an attempt to access the
internalid
key, which does not exist and is undefinedbattk
01/04/2023, 8:58 PMKnotKnick
01/04/2023, 9:05 PMvar fileId = result.values['internalid.file'].value;