1
votes

Ok so in CRM 2011 I have a field called Contract Expiry Date and I want to populate this value from an external SQL Server database...Basically I just need to grab this value, nothing fancy but where do I start?

I am familiar with JavaScript and how to use it in CRM 2011, however, for connecting to a Database it is not recommended to use JavaScript. Where do I start with something like this? I would like to run this query on the load of the form in CRM. Any ideas, do I start with .Net?

Thanks for the help! Tudor

1

1 Answers

0
votes

It depends what you want, i think you have two options: plugin or a batch process.

A plugin reacts to a event (create, update, delete, ...) of an entity. If you want do this in any of this event this is the best solution for you. In plugin you just need connect to a external database and affect some field of an entity (you have to persist the value in one entity).

If you don't have any event to put that code you can do a command line application (batch), you can put as schedule task, that do the same behavior of plugin (connects to external database and affect one entity in crm). See here a example of a plugin.