SharePoint JavaScript CSOM: Best Way To Deal With Lookup Fields?
I'm new to CSOM (I've used SPServices up to this point), and I'm trying to learn the basics to getting list items. I have a list with lots of columns, several of which are lookups
Solution 1:
The Lookup field stores object (e.g. 5;#someValue) that has two properties
- lookup Id (5)
- Lookup Value (someValue)
Please try to get lookup value by below mentioned way.
var lookupObject = oListItem.get_item('lookupFieldName');
var lookupValue = lookupObject.get_lookupValue();
var lookupId = lookupObject.get_lookupId();
Post a Comment for "SharePoint JavaScript CSOM: Best Way To Deal With Lookup Fields?"