This sample fits the 'update pattern' and shows how you can build apps that separate the user selection experience from the data. The first form is all UX which makes service calls to the second form (DB) which is never shownshown for creating new opportunities and updating existing ones.
Technotes
Download the app. From your My Apps page click New Application and then From Existing select the app you downloaded. Be sure to select Deploy and Import Data options and then select Create.
Download App Updated - updated and simplified for v1.0.3 of the App
Screenshot
...