คำตอบ DynamicEntity question...

  • 6 กรกฎาคม 2550 20:58
     
     
    Hello, I am new to CRM 3.0 and I need to retrieve and display information on a form from  other Entities (SQL Database).
    I tried to create relationships between the Entities but I cannot add the secondary (child) fields into the form.

    Is the DynamicEntity class the solution for this?

    If so, any ideas how to do it?

    Thanks.

    betolea@hotmail.com



ตอบทั้งหมด

  • 12 กรกฎาคม 2550 15:51
     
     
    Dang, I hate it that you didn't get an answer yet from the CRM team. Have you tried checking the CRM SDK at http://msdn2.microsoft.com/en-us/dynamics/crm/default.aspx ?
  • 12 กรกฎาคม 2550 17:35
    ผู้ดูแล
     
     คำตอบ

    You cannot directly display data (other than the primary attribute - i.e. the one you see in a lookup) from related entities on a form.

     

    What you can do is add an IFrame to your form to display a web page with the data you want to show. There are 3 ways to create the page:

    1. Create an .aspx page that retrieves the data and displays it. This is the most flexible option, but requires most coding work
    2. Create a Reporting Services report to display the data you want. This is the approach I normally take; rather than deploying the report through CRM, deploy it directly to Reporting Services, and you can display it directly through a URL (search for URL Access in Reporting Services Books Online)
    3. You could directly load a CRM form in the IFrame (see URL addressable forms in the CRM SDK), which needs little coding other than a small amount of client script, but has the drawback that it contains all the menu and toolbar from the form

    Btw the DynamicEntity class is of no particular use here; you could use it in the code on the .aspx page in suggestion 1, but the coding is easier if you use the strongly-typed classes

  • 2 สิงหาคม 2550 20:08
     
     

    Great I did what you suggested. It worked perfect. I can retrieve all data from the Tables and display it on my Iframe on the CRM. I have a button there which is supposed to save the changes back. the problem is that when I click it it shows me an error, "Object reference not set to an instance of an object". I am strugglin with this now.

     

    If  you have any ideas, it will be great, if not thank you  for answering.

     

     

    Regards,