I am logging it and it keeps on returning the valu...
# suitescript
p
I am logging it and it keeps on returning the value 2. even though the field contains the internal id
s
I am not sure what you mean by value of 2?
p
take a look now. the search should only return one value
I meant to say taking a look now
t
It looks like you have 2 columns being returned in the search - "custbody_pi_createdfrompi" and "createdfrom"
s
yep, depending on the data types, it should be
soId.custbody_blah
or it should be
soId.custbody_blah[0].value
p
let me try it for a minute
this worked soId.custbody_pi_createdfrompi
how do you know what data types work the one way?
s
If they are list/source vs raw string/int. Exact same behavior you would get running a search and
.toJSON()
on the results.
p
ok. it was a text field
s
yep makes sense
p
thanks for your help