Hi
I am using the crm autocomplete functionality to create an autocomplete for address field. My code looks like
suggestions = JSON.parse(resp);
if (suggestions != null && suggestions != undefined) {
for (i = 0; i < suggestions.length; i++) {
resultSet.results.push({
id: i,
fields: [suggestions[i].addressLines[0] + ' ' + suggestions[i].city + ' ' + suggestions[i].postcode]
});
}
if (resultSet.results.length > 0) {
ext.getEventSource().showAutoComplete(resultSet);
} else {
ext.getEventSource().hideAutoComplete();
}
}
What I want to be able to do is when the user selects a particular address from the autocomplete, I want to get the id of that selection (id that was added to the resultSet array above). Is there a way to do this?
Thanks
Mir