2012년 4월 12일 목요일 오전 11:45
Hi all,In my project I am integrating with CRM 2011(On premises) with one external database. I have one ID field in CRM form which represent the external db, also depend on that particular ID field some others field will populate data from that external db.
For database connection, i have created a connector(using .net) which will return data from external db.
eg: Account name XYZ have the reference number like 123. now if I call a method to fetch account name from external db by reference number[like: method1(123) ] it will return company name [like: XYZ].
Now I want to run this method for page_load event of CRM account form, thus when a particular account record will open, the system will call the method from dll to fetch the details related to that particular ID(Accout record which I just opened).
I have the DLL ready, but my concern is that how will I force CRM to call the methods of that DLL in the form_load event of account form?
Did you try the new CrmDiagTool for Microsoft Dynamics CRM 2011 ? If not, follow me
2012년 4월 12일 목요일 오후 12:02
Thanks Tanguy T,
can you / anyone please elaborate the steps (codes for web service and JScript), as I am very new in CRM development with custom code.
2012년 4월 12일 목요일 오후 1:09중재자
if you are using MS CRM 4.0 refer http://mahenderpal.wordpress.com/2009/12/31/calling-external-webservice-using-js/
2012년 4월 12일 목요일 오후 5:42
You could also use a CRM plugin to fire on the 'retrieve/multiple' of your entity that populates the custom fields from your external data source. However you'd have to re-implement your connector inside the plugin or use something like ILMERGE to package your connector with the plugin. Technically since you are on-premise you could put your connector assembly in the GAC and reference it from a non-sandbox plugin as well.
2012년 4월 17일 화요일 오전 4:46
I am using CRM online trial version for testing purpose. Instead of using the DLL, I have used the class(which basically connecting with DB and return the information) in my plugin project. I have used sample plugin project from CRM 2011 Training kit. The plugin project is running successfully without attaching the class. In another sample project(not a plugin project, a sample .net project) I have tested only the class and I got desired result in so the class is fine. But when I am attaching the class with the plugin project and register the final DLL to my CRM online project SQL server error is happening. Below is the screen shot of the error.
may be when we using SQL server connection with CRM the plugin project needs some added feature. can you point out those if it is true?
Thanks in advance.
2012년 4월 17일 화요일 오전 8:12
A simplier approach may be to use an embedded iFrame to display the data from your external database.
You can pass the Id ifield as a parameter to a web page
some details here
2012년 4월 17일 화요일 오전 8:59중재자Crm Online will not allow you to use a direct SQL connection within a plugin (this is due to the code access security implemented by the Crm Sandbox). However, if you will implement CRM OnPremise, then you will be able to make the SQL connection
- 편집됨 DavidJennawayMVP, Moderator 2012년 4월 17일 화요일 오전 9:00
2012년 4월 17일 화요일 오전 11:05
Otherwise, you would risk that data imported with the import tool or future data integrations would not receive the necessary data from the external db
2012년 4월 18일 수요일 오전 5:52
I have used On premises instead of CRM online, but the same SQL error is showing.
2012년 4월 18일 수요일 오전 6:02중재자
2012년 4월 27일 금요일 오전 7:14
Good News :) The problem is solved.
Actually I have used the IP address of the SQL Server. As per the rules of CRM
" IP addresses cannot be used. You must use a named Web address that requires DNS name resolution.”
As I have called the external system by IP address, so the problem is there.
Thanks to everyone.
Vote as Helpful
- 답변으로 표시됨 aanch 2012년 4월 27일 금요일 오전 7:14