cancel
Showing results for 
Search instead for 
Did you mean: 
Levy
Nintex Newbie

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

Jump to solution

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

 

nintex_add.png

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

 

nintex_getdata.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.

 

nintex_cache.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.

 

 

 

Labels: (1)
0 Kudos
Reply
2 Replies
Levy
Nintex Newbie

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

Jump to solution
New finding: It seems some sort of timing issue, because it is also not working sometimes in all other browsers.
0 Kudos
Reply
Levy
Nintex Newbie

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

Jump to solution

I wrapped my javaScript to:

 

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

and the problem is solved.

 

 

View solution in original post

0 Kudos
Reply