Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi All, I'm stuck on a problem where im not able to get the custom attribute on the picker callback, the tags and the scripts written in the jsp page is as specified below.
Tag written in the jsp page.
<wctags:itemPicker
id="pickerID"
objectType="WCTYPE|wt.doc.WTDocument|Type1|Type2"
componentId="pickerID"
searchResultsViewId="pickerID.view"
label="Submitter"
pickerTitle="Picker Title"
pickerCallback="PickerCallback1"
pickedAttributes="number,attrInternalName1,attrInternalName2,attrInternalName3"
/>
<script>
function PickerCallback1(objects,pickerID)
{
var myJSONObjects = objects.pickedObject;
for (var i = 0; i < myJSONObjects.length; i++) {
var str = JSON.stringify(myJSONObjects[i]);
alert(str);
var fullName = myJSONObjects[i]["attrInternalName1"];
alert(fullName);
}
}
</script>
Output on alert : "undefined"
Solved! Go to Solution.
<tr><wctags:itemPicker id="pickerid" objectType="WCTYPE|wt.doc.WTDocument|Type1|Type2" componentId="pickerid" searchResultsViewId="Picker.view" label="Submitter" pickerTitle="Customer Picker" pickerCallback="PickerCallback1" displayAttribute="number,org.CustomerName,orgCustomerNumber,org.AddressID"/></tr>
Picked attributes are not required, only display attributes are required.
This worked.
Sorry, haven't used any custom pickers jet.
By the way, it would make it easier for any reader to insert code instead copy/paste text:
Thanks, noted.
<tr><wctags:itemPicker id="pickerid" objectType="WCTYPE|wt.doc.WTDocument|Type1|Type2" componentId="pickerid" searchResultsViewId="Picker.view" label="Submitter" pickerTitle="Customer Picker" pickerCallback="PickerCallback1" displayAttribute="number,org.CustomerName,orgCustomerNumber,org.AddressID"/></tr>
Picked attributes are not required, only display attributes are required.
This worked.