Posts

Showing posts with the label Auto fill or Auto Suggestion for Textbox in Dynamics CRM from

How To add Autocomplete to a Text Field in Dynamics CRM

Scenario:
It might be requested you: when user types texts to a textbox, System helps to user with suggesting some values from couple entities in Dynamics CRM or maybe fetching records from any other resources.

Solution;
It is very simple, just register your code to the key press event for the object and fill the object with suggested values .

There is supported event for MSCRM engine (it has been so long since i do not call MSCRM :) ) calls : addOnKeyPress - when user presses a key over the object, the event is called for given delegated method

please consider performance and load on the network so;

1- do not fetch data from external resources each time user clicks the key - you can wait for the first 3 or 4 letters from the user
2- never fetch all matching records what user types so far, add "top 20 records" to your fetch method 

Implementation: first of all register the method while loading the form in Dynamics CRM:

<Practice> 
 Create a javascript (.js) for each e…