Slig
09/16/2021, 2:33 PMvar percentual = parseFloat(search.lookupFields({
type: 'customrecord_rsc_desconto_forma_de_parce',
id: currentRecord.getValue({ fieldId: 'custbody_rsc_forma_pg_st' }),
columns: ['custrecord_rsc_desconto_aplicado']
}).custrecord_rsc_desconto_aplicado) / 100
{"type":"error.SuiteScriptError","name":"SSS_MISSING_REQD_ARGUMENT","message":"search.lookupFields: Falta um argumento necessário: id","stack":["createError(N/error)","beforeLoad(/SuiteScripts/rsc/user event/rsc_eventuser_parcelamento_invoice.js:47)","createError(N/error)"],"cause":{"name":"SSS_MISSING_REQD_ARGUMENT","message":"search.lookupFields: Falta um argumento necessário: id"},"id":"","notifyOff":false,"userFacing":true}
I'm having this problem. But I did not understand. I assume I must pass only the field ID.CD
09/16/2021, 2:42 PMcurrentRecord.getValue({ fieldId: 'custbody_rsc_forma_pg_st' })
<-- log that valuereptar
09/16/2021, 2:43 PMNicholas Penree
09/16/2021, 2:46 PMSlig
09/16/2021, 3:17 PM