Hello, I have a grouped saved search that I am try...
# suitescript
p
Hello, I have a grouped saved search that I am trying to pull results from. Do you know why the following code is not getting the invoice internal id? log.debug('In Map Stage'); var searchResult = JSON.parse(context.value); log.debug({ title: 'The Search Result', details: searchResult }); var invid = searchResult.values["GROUP(internalid)"]; log.debug('Invoice to set is '+invid);
b
whats the output of the
The Search Result
log
p
message has been deleted
b
looks good to me, your
Invoice to set is
log should log the somewhat useless
"Invoice to set is [object Object]"
p
its not logging anything for setting the invoice values
b
what does the log look like
p
its just showing the following:
b
looks like an error is being thrown
p
what error? I don't see one
b
you should log the errors in your summarize stage, they aren't thrown
s
Aside from the logging problem
invid
is an object in your scenario with 2 properties,
value
and
text
, the log as it is built should provide nothing of value since a string plus and object is useless