This SharePoint jsom tutorial, we will discuss how to resolve the below error which comes in SharePoint Online JavaScript object model (jsom). The error comes as: Uncaught TypeError: Cannot read property ‘get_lookupValue’ of null.
The above error comes while trying to retrieve lookup value from people picker control using jsom in SharePoint Online. The error was coming in the below line.
var assignedby=oListItem.get_Item(AssignedBy).get_lookupValue();
Uncaught TypeError Cannot read property get_lookupValue of null
We have checked that “AssignedBy” was coming null because we were not populating AssignedBy which is a people picker control.
When we assign a value to the people picker control the error did not come.
Read some SharePoint JSOM tutorials:
- Display List items in HTML Table using JSOM in SharePoint Hosted App
- [Solved] Uncaught ReferenceError: web is not defined Error in SharePoint Online JSOM
- How to get SharePoint person or group field using javascript (jsom)
- Retrieve SharePoint list items programmatically using jsom, rest api and csom
- How to create a list using jsom (JavaScript object model) in SharePoint?
- Retrieve all users from all groups using jsom in SharePoint
- Display SharePoint List Items in Div using JSOM (javascript object model)
- Retrieve SharePoint List Items and display in Hyperlink using JavaScript Object Model (jsom)
- Insert item to SharePoint Online list using JavaScript Object Model (jsom)
- Uncaught TypeError: Cannot read property ‘get_current’ of undefined error in jsom SharePoint Online
I hope this SharePoint tutorial will help us to fix error, Uncaught TypeError Cannot read property get_lookupValue of null in SharePoint Online.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com