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:
- Create a new Browse screen, No screen data
- Don’t add any properties or data items
- Add your custom control, render as you see fit
- Or for this exercise, don’t add anything, same result
- Save your solution
- Build and run
- 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?
- Add a data item to your screen
- Can be any, ie: boolean
- Name doesn’t matter
- Not necessary to add to your visual screen design
- Save your solution, run and test
- 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!
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.
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
Thanks Dave, I’m adding the reference to the forum thread. Deep linking seems to be unstable.
Thanks! Yep, that and the _created event not firing…