Below is my search code. I'm searching for the Invoice number by using the invoice internal ID.
What is the right way to access the lookupFields search result?
var invoiceNumber = fieldLookUp.value;
I'm using the above line but the "invoiceNumber" is empty. Thanks for your help.
var fieldLookUp = search.lookupFields({
type: search.Type.INVOICE,
id: invoiceId,
columns: 'tranid'
});
var invoiceNumber = fieldLookUp.value;