locked
CRM 3.0: Error when opening existing account - "Specified Cast is not Valid" RRS feed

  • Question

  • I was alerted to a problem one of our sales reps is having. When trying to open a certain account from CRM Web app, it throws a "Specified cast is not valid" error. It only seems to be for this one account, and as far as I know no one can open it.

    Error Details: Exception of type System.Web.HttpUnhandledException was thrown.

    Exception Details: System.InvalidCastException: Specified cast is not valid.

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

    Stack Trace: 

    [InvalidCastException: Specified cast is not valid.]
       Microsoft.Crm.Application.Platform.Entity.get_Item(String name) +397
       Microsoft.Crm.Application.Components.Sdk.FormControls.Web.CrmWebFormDataControlUIWrapper.SetValue() +94
       Microsoft.Crm.Application.Components.Sdk.FormControls.Web.CrmWebFormDataControlUIWrapper.set_DataSource(Entity value) +17
       Microsoft.Crm.Application.Forms.EndUserForm.BindDataRecursively(Control control) +122
       Microsoft.Crm.Application.Forms.EndUserForm.BindDataRecursively(Control control) +281
       Microsoft.Crm.Application.Forms.EndUserForm.BindDataRecursively(Control control) +281
       Microsoft.Crm.Application.Forms.EndUserForm.BindDataRecursively(Control control) +281
       Microsoft.Crm.Application.Forms.EndUserForm.BindDataRecursively(Control control) +281
       Microsoft.Crm.Application.Forms.EndUserForm.BindDataRecursively(Control control) +281
       Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, String formId, String formType) +201
       Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity) +13
       Microsoft.Crm.Web.SFA.AccountDetailPage.ConfigureForm() +238
       Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +30
       System.Web.UI.Control.PreRenderRecursiveInternal() +62
       System.Web.UI.Page.ProcessRequestMain() +1499


    CRM version is 3.0.5300.0
    We have c360 installed on top.
    It's installed on Windows 2003 Server
    Running off of SQL 2000 DB on another server.

    Any thoughts?
    -Nick
    Monday, March 30, 2009 4:10 PM

Answers

  • Hi Nick,

    What rollup do you have for CRM 3.0 in your environment?

    To fix this if you can't figure out the issue and since it's only for a single account, you might have to go to SQL and get the data for this account and then recreate this account from scratch and delete the old account.

    Hope this helps.
    Darren Liu | 刘嘉鸿 | MS CRM MVP | English Blog: http://msdynamicscrm-e.blogspot.com | Chinese Blog: http://liudarren.spaces.live.com
    Tuesday, March 31, 2009 2:50 AM
    Moderator

All replies

  • Hi Nick,

    What rollup do you have for CRM 3.0 in your environment?

    To fix this if you can't figure out the issue and since it's only for a single account, you might have to go to SQL and get the data for this account and then recreate this account from scratch and delete the old account.

    Hope this helps.
    Darren Liu | 刘嘉鸿 | MS CRM MVP | English Blog: http://msdynamicscrm-e.blogspot.com | Chinese Blog: http://liudarren.spaces.live.com
    Tuesday, March 31, 2009 2:50 AM
    Moderator
  • Hey Darren-
    I just installed rollup 3 about a week and a half ago.
    I'll try grabbing that information from SQL in case I need to recreate.
    Thanks
    -Nick
    Tuesday, March 31, 2009 3:02 PM
  • Darren-
    Well... you led me to fixing the problem. There was evidently a corrupt field in the original account. I created a new one, and then in SQL, started copying each field over and testing. As soon as I copied over the "OriginatingLeadId" field, I got the error on the new account that I created. I changed it to a different ID and it started working.

    Thanks!
    -BigfootNick
    Tuesday, March 31, 2009 3:32 PM
  • Hi darrenliu

           I am working in MS CRM 4.0..while i am trying convert the lead using "Convert Lead" button, but i getting Error on page in the bottom of the page also its not getting conveting..i have created new organization to check this issue, but i am getting the same error..Is there any problem with instalation or something else..Can anyone please help me..

    Regards

    Arun

    Tuesday, June 16, 2009 7:03 AM