How to generate child records using an UI Action

I have come to a problem when generating new child records on a form via UI action button. Let’s assume we have parent-child datastructure for example DeliveryDetailDeliveryDetailItem. While standing on one Delivery structure record I want to generate new DeliveryDetailItem records while compying with following rules:

  1. newly generated records will be visible immediatelly after finishing UI action workflow call
  2. all rules on Delivery structure entity must be run after finishing UI action workflow call
  3. newly generated records in DeliveryDetailItem structure entity are not saved, so the whole screen must be saved by pressing Save button

Thank you for quick answer.

This scenario is supported.

  1. Right click on an entity (e.g. Delivery) and select New > Sequential Workflow Action
  2. ActionType = Workflow
  3. Create a context in your workflow with the same structure as your screen (e.g. DeliveryComplete)
  4. Create a parameter mapping with name of the target context (e.g. DeliveryComplete) and MappedColumn = . (just a single dot). This will pass the current record with all the children will to the target context store.
  5. Process the context store in the way you want (e.g. adding a new detail record using a transformation).

The “.” mapped context will be automatically merged back to your screen. The screen will get dirty and rules will get processed.