locked
CRM 2011 Customer Portal debug error RRS feed

  • Question

  • I receive this error when running the debug for the solution:

     -Warning 30546 Could not resolve this reference. Could not locate the assembly "Microsoft.Xrm.Client".  -

    The Xrm directory was copied with the web directory.

    Saturday, March 12, 2011 11:00 AM

Answers

  • I also experienced this error the other day when I set up an IIS website for the first time.  I had to open Visual Studio and compile the site for the error to go away.  I did not get to the bottom of the problem to understand why - it appears as though the correct assemblies are present in the bin.  That said, a compile did the trick for me.
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    • Proposed as answer by Jim Glass Jr Tuesday, March 15, 2011 3:07 PM
    • Marked as answer by Palak Kadakia Thursday, March 17, 2011 1:05 AM
    • Marked as answer by Palak Kadakia Thursday, March 17, 2011 1:05 AM
    Tuesday, March 15, 2011 12:10 AM
    Moderator

All replies

  • I also experienced this error the other day when I set up an IIS website for the first time.  I had to open Visual Studio and compile the site for the error to go away.  I did not get to the bottom of the problem to understand why - it appears as though the correct assemblies are present in the bin.  That said, a compile did the trick for me.
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    • Proposed as answer by Jim Glass Jr Tuesday, March 15, 2011 3:07 PM
    • Marked as answer by Palak Kadakia Thursday, March 17, 2011 1:05 AM
    • Marked as answer by Palak Kadakia Thursday, March 17, 2011 1:05 AM
    Tuesday, March 15, 2011 12:10 AM
    Moderator
  • Its because you are not only wrongly generated xrm.cs.

    But also maybe missing references in XRM project- just add them manualy and rebuild...

    Go to XRM - references and add the 3 that are corrupted : Microsoft.xrm.client, Microsoft.xrm.portal and Microsoft.xrm.sdk

    for online the right command is:

     

    CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"/url:https://XXX.api.crm4.dynamics.com/XRMServices/2011/Organization.svc /out:xrm.cs /username:"name" /password:"pass /namespace:Xrm  /serviceContextName:XrmServiceContext  /serviceContextPrefix:Xrm

    Saturday, November 26, 2011 8:30 AM
  • I have create a new page name task, and I want all the task associated with that contact displayed on that page, is there a help on how I could do that? I tried to check and it seems I have to add a taskAccess entity as well? How about this part of the code what does this mean? ActivitiesList.ColumnsGenerator = new CrmSavedQueryColumnsGenerator("Cases Web View"); where was Cases Web View called?
    women's health
    Monday, November 28, 2011 9:10 AM
  • If you want to have 'tasks' surfaced in the portal, then I think that the 'cases' is probably the best example to model your new code.  If you want to configure special security for tasks other than always showing tasks that are related to a contact, then you would want to add a security entity for configuring that security (taskAccess as you mentioned), but if you don't need that additional security, then you won't need that security entity.

    Adding tasks to the portal will likely mean adding a task list page as well as a task detail page.  The job of the task list page is to list open tasks, and you can use a CrmEntityFormView control and tie it to a CRM view, or you can use a standard Linq query in the code-behind and then use CrmSavedQueryColumnsGenerator() to build columns for a data table.  These techniques are all in the source code of the customer portal under the /Pages/eService folder.

    I would highly recommend you use Visual Studio and debug the existing customer portal.  Place some breakpoints in some of the pages that interest you and examine the variables and page flows and step through the page one line at a time.  Examining how the portal is running is one of the first steps to learning how to write your own extensions.

    Good luck!


    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    Monday, November 28, 2011 3:25 PM
    Moderator