troubleshooting Question

Lightswitch HTML Client - How do you pass a value from one screen to another?

Avatar of wint100
wint100Flag for United Kingdom of Great Britain and Northern Ireland asked on
.NET ProgrammingMicrosoft Development
1 Comment1 Solution1646 ViewsLast Modified:
My question in particular is based upon a view screen, where I have a unique ID and I want to pass this to an Add/Edit screen. So rather than the user having to type this out every time, they can simply just click on the details picker plus symbol and selected the value(s) associated with that.

So for example I have a CustomerID which is 1, and they have made an order (OrderID 100). On this Order I want to add an item they have purchased and display it onto the OrdersViewScreen. Within Lightswitch I have an AddDeliveryLine button which takes me to this particular Add screen. I have set up a query based on the CustomerTable, which asks the user to search by their CustomerID… When I type in 1 myself it will load up the items the customer is awaiting within the CustomerOrders details picker.


The values need passing within JavaScript however the following methods ive tried have not worked:

myapp.AddEditDeliveryLine.CustomerID_postRender = function (element, contentItem) {

    contentItem.screen.CustomerID =

myapp.ViewDeliveryNote.ShowAddEditDeliveryLine_canExecute = function (screen) {
    return screen.CustomerID;
myapp.ViewDeliveryNote.ShowAddEditDeliveryLine _execute = function (screen) {
    return myapp.showAddEditDeliveryLine(screen.CustomerID);

I’ve added a print screen of what I am trying to accomplish. Thanks for any help.
David Johnson, CD
The More I know, the more I don't know
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros