Search code examples
dynamics-crmmicrosoft-dynamicsdynamic-sqldynamics-crm-webapi

Automatic display of records in Dynamics


So i am trying to retrieve records from the database when an info is typed into a field e.g Sprint is entered into "Company name" field , how can i capture the contents of that field, retrieve it's records from the database and use it to fill the remaining parts of the form. This is my first time using dynamics CRM, would like it if someone can help me out or point me in the right direction.


Solution

  • Dynamics crm has provided on change event of a field here Attribute OnChange Event (Client API reference) you can find info about it.

    How to write client side scripting in Dynmaics crm

    Steps I would perform:

    1. Add onchange event for field on which you want it to fire.
    2. Then I would add javascript for the onchange of field
    3. In that Javascript I will use Dynamics crm Webapi to retrieve data from Account Xrm.WebApi (Client API reference)
    4. Once I get the data I would set that in those field where needed on from setValue (Client API reference)

    You will find numerous example of how to create a Javascript for Dynamics CRM