Create from shipments

The Ribbonmakro-Befehl 'Create manifest from Shipments' opens a new manifest (detail view) starting from a selection of shipments (usually in a shipment overview), provided that the event handling triggered by the event 'Create from shipments' is executed without any error or being aborted. The selected items are transferred as data context, which can be processed within the event handling in a loop, as the following example shows.

NOTE◄ By calling the menu command, the manifest is created implicitly, i.e. without the need to call a specific action within the event action.

Example

images/download/attachments/69043122/image2018-8-14_8_42_24-version-1-modificationdate-1614336743331-api-v2.png

  • The event 'Create from shipments' serves as a triggering event for event handling.

  • As a checking rule, a type check AND a check for a specific company context is performed (not shown in the image).

  • No entries are necessary in the loop header, since the shipment selection is always passed as an enumeration of shipments that are run through in the loop.

  • Within the loop, an action of the type Für jeden Eintrag wiederholen (Schleife) should ensure that the current working state 'Accepted' (localized as symbol:☼) applies to all selected items.

  • The check of each shipment is done by Entity property rule, where the 'current working state' is resolved in two stages (left side: object field 'currentWorkingState' of the shipment and of it object field 'workingState'), so that it can be compared with a Statischen Wert from the dynamic enumeration Working state (right side: working state '☼').

  • If a shipment is detected with a deviating current working state, an Abort with a message is performed and the manifest is not opened.