Has anyone had an issue where nlapiLookupField on ...
# suitecommerce
k
Has anyone had an issue where nlapiLookupField on a purchase order record only returns null in a SuiteScript model?
d
I'd suspect almost certainly a permissions issue. Are you doing this in a service file with elevated permissions?
k
I do have elevated permission. I'm also using the same service to load the purchase order record in another model function.
d
Tried the 4th input parameter as true?
And run as admin if it's not already? forgot you can't do that with SSPs
👍 1
k
I have not tried the 4th param.
d
Is it definitely a body field?
k
it's the total field, which is listed on the PO records browser search fields.
d
Does it return OK from console in UI?
k
it does return no problem
d
I've had occasional issues with nlapiLookupField in SSPs returning unexpected values. In one case, it was returning an entirely different field value. I'd try switching to a search instead. Speed overhead's not generally an issue with small record counts
👍 1
n
@Kearobi please make sure the permission for purchase order to view
👍 1