10 Replies Latest reply on Aug 17, 2006 7:30 AM by aBill

    TypeError: Error #1034: Type Coercion failed:

    pwp69 Level 1
      I am trying to get my head around FDS and Coldfusion by working with the CRM sample app. For the most part I have followed Tom Jordahl's "Using ColdFusion with Flex – Part 2: Creating and running a CRM application" but with a few minor changes.

      I moved the 'crm' folder out of the 'samples' folder and renamed the subfolder the .as files are in from 'sample.crm' to 'com.crm' (I changed all .mxml, .as and .cfc references appropriately)

      When I call companyapp.mxml from a browser the datagrid is display and populated. The problem arises when I click on a record in the displayed data. I expected the row's data to be display in the form fields. Instead I get a popup with:

      TypeError: Error #1034: Type Coercion failed: cannot convert mx.data::ManagedObjectProxy@3331e09 to com.crm.Company.
      at companyapp/::companyChange()
      at companyapp/__dgCompany_change()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::mouseUpHandler()
      at mx.controls::DataGrid/mx.controls:DataGrid::mouseUpHandler()

      Can someone tell me what I am doing wrong?