Matt
Matt

Reputation: 53

Is it possible to fetch a line item's value with out having to load the whole record?

I'm trying to speed up my ssp application by using nlapiLookupField where possible instead of having to load the whole record and it's sublists using nlapiLoadRecord. Unfortunately it doesn't seem to work with lineitem fields. Is there an api call to fetch a line item's value with out the needing to use nlapiLoadRecord?

I'm using 1.0 as dictated by SCA.

Upvotes: 0

Views: 2408

Answers (2)

Krypton
Krypton

Reputation: 5286

nlapiLookupField() is limited to body fields, however you can use other search apis (eg: nlapiSearchRecord()) to return any information that a saved search can access, which obviously includes item lines. This is particularly useful if you want to read a few fields from a large number of records, but I believe it's performant compared to loading a record even if you just return a single result, say by passing in an internal id as one of the filters. I haven't tested to compare a single result search with a single record load though, so YMMV.

Upvotes: 4

ehcanadian
ehcanadian

Reputation: 1794

Unfortunately, no. Only body fields are supported with nlapiLookupField or search.lookupFields.

Upvotes: 2

Related Questions