Skip to main content
Nintex Community Menu Bar

Unable to get property "_addItem" of undefined or null reference

  • November 18, 2020
  • 2 replies
  • 17 views

Forum|alt.badge.img+6

When I try to assign a user to a people picker by JavaScript, I get above error.

This error occurs only in IE 11 (11.1198.18362.0)

The code is working in IE 11 (11.1139.18362.0CO) as in all other Browsers.

 

NWF$(function () { var user = 'john.doe@world.com'; var ctl = new NF.PeoplePickerApi('#' + timeOfficer); if(ctl) { ctl.search(user).done(function (data) { ctl.add(data[0]); }); } });

 

From ctl.add(data[0]) the code goes to the add funtion from the Nintex JavaScriptStringHandler

_layouts/15/NintexForms/JavaScriptStringHandler.ashx?resourceType=jsfile&fileName=NF.PeoplePickerHelper.js&culture=de-DE

 

9491iADBB79A1B18D8B24.png

getData will then return undefined and the error message will be logged to the console.

 

9492i392FA34FCDFB5034.png

 

So, it seems that something is not supported in the data extension of jquery, used by Nintex.

What I have seen so far, is that it has to do with the caching mechanism they use.

 

9493i9CFADBA192EBEF4B.png

here thisCache["uiItempicker"] returns null, while the object can be found in other Browsers.

Does anybody knows how to workaround this issue.

 

Yes, and sorry, still a lot of users of my customer are using IE 11.

 

 

 

2 replies

Forum|alt.badge.img+6
  • Author
  • November 20, 2020
New finding: It seems some sort of timing issue, because it is also not working sometimes in all other browsers.

Forum|alt.badge.img+6
  • Author
  • November 20, 2020

I wrapped my javaScript to:

 

NWF.FormFiller.Events.RegisterAfterReady(function () { });

and the problem is solved.