Complex transactions

You can link applications to support complex transactions. These linked applications must be related and processed as such by both the server code and the client user interface. To accomplish this, each of the linked new components is associated with a level attribute.

This example illustrates the concept of level attributes:

A Customer Account application is associated with Contacts and Opportunities. Contacts and Opportunities do not exist without an Account. In terms of database entity-relationships, Account (ID) is a foreign key for Contact and Opportunity creation. Users are required to first create an Account, then create Contacts and Opportunities, which must then be associated with the Account created.

In this example, Account creation is a Level 1 operation and Contacts and Opportunities are Level 2 operations. Results (key) from Level 1 (new Account ID) are used in Level 2 operations (Account ID is a foreign key for Contact/Opportunity creation).

In SAP applications, when you link a new application, Mobile Web Studio shows it as a Level 1 application then silently queries the application to determine if it has input tables. If it does, hidden Level 2 items are automatically generated for each input table. When the insert application is synced to a mobile device, the mobile client automatically generates 2nd level inputs for each table. When the sync update is performed, the 2nd level data is gathered and passed into different rows in the SAP table.

NoteIn update applications all parameter names must match the column labels from the parent table. When syncing an application, UA looks at linked update applications and walks down their list of update parameters to match them with label names in the parent table. If it doesn't find a match for every update parameter, it ignores the update application and you do not get an Edit button.

StepsLinking applications

Before linking applications, create the applications you require; for example, you may need to create insert, update, delete, and login applications first, and then create a master application that links to these applications.

  1. In Application Builder, navigate to the Mobile tab.

  2. Click Add, then find and select the application to which to link. The application displays on the tab.

  3. Make these settings for the linked application:

NoteTo remove a linked application, click the X box to the left of the application name.