Eval Error

Jan 17, 2013 at 11:12 AM

Hi

I tried to use the Silverlight CRM Lookup but I fail. When I add the lookup component into my Silverlight component, I simply get the error

"System.InvalidCast.Exception - Specified cast is not valid"

in the deisgner.

When I then run the SLight project, I get an "Exception: Eval failed" at LookupControl.SilverCrmLookup.LoadEntity().

I then copied the OpenLookup routine from SilverCrmLookup into my component for better debugging and it also fails with an "Eval failed". Of course this happens in the line

result = (ScriptObject)HtmlPage.Window.Eval(sb.ToString());

I attached the error message at the end.

I am a little but puzzled because I did not figure out how to handle this eval error? Am I missing something?

Thank you

David

 

Visual Studio 2010

Silverlight 4

IE 9.0.8112.16421

Eval-Error:

{System.InvalidOperationException: Eval failed.
   at System.Windows.Browser.HtmlWindow.Eval(String code)
   at XRMTimesheet.ViewModel.ServiceViewModel.OpenLookup()
   at GalaSoft.MvvmLight.Command.RelayCommand.Execute(Object parameter)
   at System.Windows.Controls.Primitives.ButtonBase.ExecuteCommand()
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)}