Complex Objects – Local Flow (Create, Edit)

This article describes the local flow for creating and editing items using standard message handling and draft handling.

If you need the flow for deleting items, see Delete Objects.

Information

  • If you are not using standard draft handling, show a data loss message whenever the user leaves a changed subpage without saving the data. Also display the data loss message if the user changes data on the main page without saving.
  • If you implement your own draft behavior, use the keep draft dialog.
  • If the items contain only a few fields, you can also use a dialog instead of a subpage. We recommend using the same pattern for creating and editing items.

Global vs. Local Flow

Complex objects manage items on subpages. In the local flow, each subpage needs to be saved separately. This differs from the global flow, where only the main page needs to be saved. For more information on when to use each flow, see the flow descriptions with examples.

The table below summarizes the main differences between the global and local flows on the UI.

Global Flow

Local Flow

Main object Main object must be in edit mode. Main object can be in display or in edit mode.
Actions in the footer toolbar of the subpage Create item: Add and Cancel
Edit item: Apply and Cancel
Create item: Create and Cancel
Edit item: Save and Cancel
Message toasts No message toasts are displayed after choosing Add and Apply.
Instead, an indicator appears in the items table.
Message toasts are displayed after choosing Create and Save.

Create Items

The steps below describe the local flow for creating items on a subpage with the main page in display mode. The flow is the same when the main page is in edit mode.

Full Screen Layout

Complex objects - Create items using the local flow
Complex objects - Create items using the local flow
  1. On the main object page, the user chooses Create in the toolbar for the items table.
    An empty subpage appears with the title New <item> (for example, New Sales Order Item). The footer toolbar contains the finalizing Create action and Cancel.
  2. After entering all the data, the user chooses Create.
    The standard flow navigates back to the main object page and shows a message toast.
    Depending on your use case, you have the following alternatives:

    • You can show the subpage in display mode.
    • You can keep the subpage in edit mode.
    • If the user needs to create several items in succession, you can offer the action Create and Next in the footer toolbar of the subpage. This opens a new, empty subpage.
  3. Choosing Cancel opens a confirmation popover, and the user can opt to discard the draft. In this case, the system navigates back to the main object page.
Guidelines
If you offer Create and Next on the subpage, use the following order: Create and Next, Create, Cancel. Only emphasize Create and Next.
Developer Hint
If you offer an Create and Next option, add a comment for translators to indicate what “Next” refers to in your app.

Flexible Column Layout

In the flexible column layout, the standard flow is as follows:

  • Choosing Create on the subpage closes the subpage column. A message toast is displayed on the main page.
  • Confirming Cancel closes the subpage column.
  • Choosing Create and Next on the subpage opens a new, empty subpage in the subpage column, with a message toast.

Edit Items

The steps below describe the local flow for editing items on a subpage with the main page in display mode. The flow is the same when the main page is in edit mode.

Full Screen Layout

Complex objects - Edit items using the local flow
Complex objects - Edit items using the local flow
  1. From the main object page, the user navigates to the details of an item.
    The subpage features a header toolbar with an Edit buttonThe title of the subpage reflects the current item, for example Sales Order Item (10).
    If users need to open the item directly in edit mode, you can offer Edit in the table toolbar or as an inline action.
  2. On the subpage, the user chooses Edit. The subpage changes to edit mode, and the footer toolbar offers the finalizing Save action and Cancel. The title does not change.
  3. After updating all the data, the user chooses Save.
    The standard flow shows the updated item in display mode with a message toast.
    Depending on your use case, you have the following alternatives:

    • You can keep the subpage in edit mode.
    • If the user needs to edit several items in succession, you can offer the action Save and Next in the footer toolbar of the subpage. This opens the subpage for the next item in edit mode.
    • You can show up and down arrows for navigating to the previous or next item in edit mode.
  4. Choosing Cancel opens a confirmation popover and the user can opt to discard the draft. In this case, the system displays the item subpage.
Guidelines

  • If you offer Save and Next, use the following order: Save and Next, Save, Cancel. Only emphasize Save and Next.
  • Use either Save and Next or the up and down arrows, never both.
  • Choose Save and Next if users need to change one item after the other. Offer the up and down arrows if the user just needs to change a few items and needs to page through the items quickly to reach those that are relevant.

Developer Hint
If you offer a Save and Next option, add a comment for translators to indicate what “Next” refers to in your app.

Flexible Column Layout

In the flexible column layout, the standard flow is as follows:

  • Choosing Save on the subpage switches the subpage column to display mode. A message toast is displayed on the subpage.
  • Confirming Cancel on the subpage switches the subpage to display mode.
  • Choosing Save and Next on the subpage opens the next item in edit mode in the subpage column.

Related Links

Elements and Controls

Implementation

Complex Objects – Global Flow (Create, Edit)

This article describes the global flow for creating and editing items using standard message handling and draft handling.

If you need the flow for deleting items, see Delete Objects.

Information

  • If you are not using standard draft handling, show a data loss message whenever the user leaves the entire create/edit flow or the main page without saving the data. This applies to both backward and forward navigation, for example:
    • Back navigation using a breadcrumb, the shell bar, or browser back
    • Forward navigation from the main page to another app

It does not apply to forward navigation from the main page to a subpage.

  • If you implement your own draft behavior, use the decision dialog.
  • If the items contain only a few fields, you can also use a dialog instead of a subpage. We recommend using the same pattern for creating and editing items.

Global vs. Local Flow

Complex objects manage items on subpages. In the global flow, only the main page needs to be saved. This differs from the local flow, where each subpage has to be saved separately. For more information on when to use each flow, see the flow descriptions with examples.

The table below summarizes the main differences between the global and local flows on the UI.

Global Flow

Local Flow

Main object Main object must be in edit mode. Main object can be in display or in edit mode.
Actions in the footer toolbar of the subpage Create item: Add and Cancel
Edit item: Apply and Cancel
Create item: Create and Cancel
Edit item: Save and Cancel
Message toasts No message toasts are displayed after choosing Add and Apply.
Instead, an indicator appears in the items table.
Message toasts are displayed after choosing Create and Save.

Create Items

The steps below describe the global flow for creating items on a subpage. The main page must be in edit mode.

Full Screen Layout

Complex objects - Create items using the global flow
Complex objects - Create items using the global flow
  1. On the main object page, the user chooses Create in the toolbar for the items table.
    An empty subpage appears with the title New <item> (for example, New Sales Order Item). The footer toolbar contains an Add action and Cancel.
  2. After entering all the data, the user chooses Add.
    The standard flow navigates back to the main object page. The new item is highlighted in the items table.
    Depending on your use case, you have the following alternatives:

    • You can keep the subpage in edit mode. In this case, the title changes to reflect the specific item. For example, Sales Order Item (10).
    • If the user needs to create several items in succession, you can offer the action Add and Next in the footer toolbar of the subpage. This opens a new, empty subpage.
  1. Choosing Cancel opens a confirmation popover and the user can opt to discard the item. In this case, the system navigates back to the main object page.

The item is only saved to the database when the user chooses Save on the main object page.

Guidelines
If you offer Add and Next on the subpage, use the following order: Add and Next, Add, Cancel. Only emphasize Add and Next.
Developer Hint
If you offer an Add and Next option, add a comment for translators to indicate what “Next” refers to in your app.

Flexible Column Layout

In the flexible column layoutthe standard flow is as follows:

  • Choosing Add on the subpage closes the subpage column. The new item is highlighted in the items table.
  • Confirming Cancel closes the subpage column.
  • Choosing Add and Next on the subpage opens a new, empty subpage in the subpage column.

Edit Items

The steps below describe the global flow for editing items on a subpage. The main page must be in edit mode.

Full Screen Layout

Complex objects - Edit Items using the global flow
Complex objects - Edit Items using the global flow
  1. From the main object page, the user navigates to the details of an item.
    The subpage opens in edit mode. The title of the subpage reflects the current item, for example, Sales Order Item (10). The subpage shows a footer toolbar containing the Apply action and Cancel.
  2. After updating all the data, the user chooses Apply.
    The modified item is highlighted in the items table.
    Depending on your use case, you have the following alternatives:

    • You can keep the subpage in edit mode.
    • If the user needs to edit several items in succession, you can offer the action Apply and Next in the footer toolbar of the subpage. This opens the subpage for the next item in edit mode.
    • You can show up and down arrows for navigating to the previous or next item in edit mode.
  3. Choosing Cancel opens a confirmation popover and the user can opt to discard the changes to the item. In this case, the system navigates back to the main object page.

The item is only updated on the database when the user chooses Save on the main object page.

Guidelines

  • If you offer Apply and Next, use the following order: Apply and Next, Apply, Cancel. Only emphasize Apply and Next.
  • Use either Apply and Next or the up and down arrows, never both.
  • Offer Apply and Next if users need to change one item after the other. Offer the up and down arrows if the user just needs to change a few items and needs to page through the items quickly to reach those that are relevant.

Developer Hint
If you offer an Apply and Next option, add a comment for translators to indicate what “Next” refers to in your app.

Flexible Column Layout

In the flexible column layoutthe standard flow is as follows:

  • Choosing Apply on the subpage closes the subpage column. The modified item is highlighted in the items table.
  • Confirming Cancel closes the column subpage.
  • Choosing Apply and Next on the subpage opens the next item in edit mode in the subpage column.

Message Handling

On the main page, validation is triggered on focus out and when the user selects Save. On a subpage, validation is triggered on focus out and when the user selects Add or Apply.

If errors occur, a message popover appears:

  • On the main page, the message popover displays errors coming from the main page and error summaries coming from all related subpages. To help the user find the item and solve the issue, an indicator in the line item of the table shows which subpage contains errors. In addition, the errors in the message popover are grouped by page, tab, and section. For more information about how error messages are grouped, see message popover components.
  • On a subpage, validation only applies for the current subpage. The message popover lists only errors related to this subpage.
Global flow - Message handling
Global flow - Message handling

For more information about messaging, see message handling.

Related Links

Elements and Controls

Implementation