cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

custom Picker Callback not working

SK_10232357
3-Visitor

custom Picker Callback not working

Hi All,

I tried creating a custom picker using data utility. It is coming on UI but custom picker callback is not working.

I am getting following error:

"It seems that you have not defined the callback function or the there is some error in it: testCallBack exception: ReferenceError: testCallBack is not defined"

 

Picker Callback:

 

 

function testCallBack(objects, pickerID ) {
    alert("in testCallBack");
   	 
var updateHiddenField = document.getElementById(pickerID);
var updateDisplayField = document.getElementById(pickerID +
"$label$");
var myJSONObjects = objects.pickedObject;
for(var i=0; i< myJSONObjects.length;i++) {
var oid = myJSONObjects[i].oid;
//Here “name” is the displayAttribute requested
var displayAttr = eval("myJSONObjects[i].name");
updateHiddenField.value=oid;
updateDisplayField.value=displayAttr;
}

}

 

 

 

 

 

 

 

 

 

 

 

1 REPLY 1
TDT
12-Amethyst
12-Amethyst
(To:SK_10232357)

Hi @SK_10232357.

 

Are you using any custom.js file to implement the above function?

If using make sure that custom.js is registered.

Top Tags