Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Dynamics CRM 2016 Autocomplete text box

$
0
0

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


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>