cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

PeoplePickerApi - Unable to get property 'url' of undefined or null reference

My requirement is to populate a people picker field when a list lookup dropdown value is changed on a list form. I started off with a simplified version by placing a JavaScript button on the form and wrote a method to populate the people picker field using NF.PeoplePickerApi. I'm calling JS method on Client Click of that button. The method gets invoked fine however, it fails with this error - 

IE (Developer Tools --> Console) SCRIPT5007: Unable to get property 'url' of undefined or null reference

File: JavaScriptStringHandler.ashx, Line: 292, Column: 13

Firefox (Developer --> Console) TypeError: config is null

Here is the JavaScript code block which is failing-

search: function (term) {

     var config = this.$elem.data();

     return $getJSON(config.url + "/vti_bin/NintexFormsServices/NfRestService.svc/AutocompleteValue/PeoplePicker", {

     ------

Here is my JavaScript Method:

function setNFPeoplePicker(controlId, userAccount) {

     var ins = new NF.PeoplePickerApi('#' + controlId);

     ins.search(userAccount).done(function (data) {

          ins.add(data[0]);

     });

}

The method is being invoked by passing People Picker Control's client id as first parameter and the userAccount (domain\\userid) as second parameter. I tried with various combinations by removing the domain name, including the token 'i:0#.w', excluding the token and even passing Display Name as userAccount but no luck.

Environment Details:

SharePoint Server 2013 On-Premise

Nintex Forms 2013  v2.7.0.0

IE 11

I would really appreciate your help!

0 Kudos
Reply
1 Reply
Highlighted
Automation Master
Automation Master

Re: PeoplePickerApi - Unable to get property 'url' of undefined or null reference

The method is being invoked by passing People Picker Control's client id

you have to configure javascript variable for PP control and use that variable in this context. is it that what you mean with 'controlid'?

I tried with various combinations by removing the domain name, including the token 'i:0#.w'

the more precisely you identify user the easier/more reliable results you get.

so the best option is to supply user identifier in a form claim_token|domain\userlogin

0 Kudos
Reply