Depending how you get that result back... but basi...
# suitescript
a
Depending how you get that result back... but basically like that...
n
I tried that but it didnt work. I am trying to do a lookup on 3 fields like this:
Copy code
var vra_number = s.lookupFields({
                		type: s.Type.VENDOR_RETURN_​AUTHORIZATION,
                		id: vra_internalid,
                		columns: [
                		          			"entity",
                		          			"trandate",
                		           			"custbody_vendor_bill_num_vra",
                		          		]
                	});
And I extract them like this:
Copy code
vra_json.vendor   = vra_number.entity;
                	vra_json.date   = vra_number.trandate;
                   	vra_json.vendor_bill   = vra_number.custbody_vendor_bill_num_vra;
This last field is what I am trying to get the text value for, if i try
Copy code
"vra_number.custbody_vendor_bill_num_vra.value'
, that returns nothing...
a
Did you try vra_number[0].entity.value?
n
Yes i tried that but get this error message:
Copy code
org.mozilla.javascript.EcmaError: TypeError: Cannot read property "entity" from undefined (/SuiteScripts/Vendor Return Authorization/VRA_PrintPDF_button_code_v1.0.js#90)
I am not sure that you get reference the value like an array
ok i figured it out... the right syntax is like this
Copy code
vra_number.entity[0].value
vra_number.entity[0].text
Thanks for your help again...