Reputation: 637
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.
Upvotes: 0
Views: 137
Reputation: 6170
CRM also has what is known as a Quick View Card which can retrieve values from the source record (for display only).
For example, when you select "Sprint" as the Company Name, you can use a Quick View Card to display information about the "Sprint" account
record.
Here's the MSDN Link
A quick view control on a custom business app form displays data from a record that is selected in a lookup on the form. The data displayed in the control is defined using a quick view form. The data displayed is not editable, but when the primary field is included in the quick view form, it becomes a link to open the related record
This is a code-free alternative to the answer described below, so the advantage is that it is easier to maintain. The data is also "live" meaning that if you update a phone number on the "Sprint" account
the update will appear on all quick view forms (after a refresh)
The disadvantage is that this is not a copy of the data, so may be a problem for future reporting. If you need a point-in-time capture of the data, this can also be a problem.
Upvotes: 1
Reputation: 5531
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:
You will find numerous example of how to create a Javascript for Dynamics CRM
Upvotes: 1