LightSwitch 2013 – March 2014 Update – Bug

This is one of a few “issues” that are cropping up with the March 2014 update to LightSwitch 2013.

This is most likely for those that go outside the expected “normal” for LightSwitch, which fortunately may affect only a few. For example, creating a screen that does not have any “official” data items. Where we are just creating our own custom control and rendering our own content.

The LightSwitch runtime does NOT like this, yet will not complain until the worst possible time… to repro:

  1. Create a new Browse screen, No screen data
  2. Don’t add any properties or data items
  3. Add your custom control, render as you see fit
  4. Or for this exercise, don’t add anything, same result
  5. Save your solution
  6. Build and run
  7. All works as expected

Until…

User is on your custom screen and presses the refresh button on the browser
The LightSwitch JavaScript runtime will error out due to an array length issue
Bug was tracked down to starting at line 11909 in file msls-2.5.0.js
It does not like the fact that screenParameters has an “undefined” value

So whats the work around?

  1. Add a data item to your screen
  2. Can be any, ie: boolean
  3. Name doesn’t matter
  4. Not necessary to add to your visual screen design
  5. Save your solution, run and test
  6. Issue resolved

This was/is causing a problem with my core project, which I’m in the process of upgrading.

Also take a look at this thread where others are also having issues when it comes to the new “Deep Linking”.

Be forewarned!

4 thoughts on “LightSwitch 2013 – March 2014 Update – Bug

  1. Mehdi says:

    Hi Dale,
    First of all thanks for sharing your work with the rest of the world!
    I’m a professional ASP .NET developer but I’m totally new to Lightswitch. I found your blog by chance and I think I understand what you are trying to achieve. I However find it hard to have a clear idea on how to reuse this project of yours! If I got it right the whole experience is shared through this blog and is thus not obvious where when should start.
    It’d be very useful (to people like me) if you could produce a small tutorial, from a to z on how to take advantage of the project. It doesn’t need to be huge, just a roadmap (possibly pointing to blog posts here and there) so one would clearly know where to start.
    Thanks again!
    Regards, Mehdi.

  2. Xpert360 says:

    Hi Dale,
    There was a forum thread on this issue and Dave Kidder managed to repro this. It seemed to be part of the new navigation/deep-link logic. I submitted a sample project. Waiting to hear back.
    Dave

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: