locked
Type 'LightSwitchApplication.TableName' does not have a property named 'TableName' ... RRS feed

  • Question

  • I'm getting this error when opening a screen, on the HTML Client:

    Type 'LightSwitchApplication.TableName' does not have a property named 'TableName'; there is no service action named 'TableName' that is bindable to the type 'LightSwitchApplication.TableName'; and there is no type with the name 'TableName'.

    Note that I replaced the name of my table with TableName.

    I can't seem to find the problem. Everything compiles well and I can reach the table with LINQPad connected to the OData endpoint.

    Saturday, April 27, 2013 1:50 PM

Answers

  • Hi,

    This error is thrown when the shell is loading the screen's model and finds an invalid data binding. One possibility is you have a Content Item that is bound to the screen's property named TableName, so the binding path is TableName. If that ContentItem is then moved under a different ContentItem that is also bound to TableName, the first ContentItem is now bound to a property named TableName on the screen.TableName object (which is of type LightSwitchApplication.TableName). Since TableName property does not exist on LightSwitchApplication.TableName type, the error is thrown.

    Best regards,
    Huy

    Tuesday, April 30, 2013 4:54 AM

All replies

  • I ended up recreating the screen and now it's working again. Still don't know how that happened, so I hope it won't happen again.
    Saturday, April 27, 2013 2:12 PM
  • Hi,

    This error is thrown when the shell is loading the screen's model and finds an invalid data binding. One possibility is you have a Content Item that is bound to the screen's property named TableName, so the binding path is TableName. If that ContentItem is then moved under a different ContentItem that is also bound to TableName, the first ContentItem is now bound to a property named TableName on the screen.TableName object (which is of type LightSwitchApplication.TableName). Since TableName property does not exist on LightSwitchApplication.TableName type, the error is thrown.

    Best regards,
    Huy

    Tuesday, April 30, 2013 4:54 AM
  • I couldn't reproduce the issue again, but your explanation seems very good to me.

    Thank you again.

    Tuesday, May 7, 2013 2:37 PM