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.

Hi Tomas,

is there also supported the scenario when I want to delete several rows? And several rows I want to add?

My transformation is very simle, so I expect to delete all rows when I use Full merge but the rows remains untouched by workflow:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
	xmlns:AS="http://schema.advantages.cz/AsapFunctions"
	xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="AS date">

	<xsl:template match="ROOT">
		<ROOT>
			<xsl:apply-templates select="TestEntity"/>
		</ROOT>
	</xsl:template>

	<xsl:template match="TestEntity">
		<xsl:copy>
			<xsl:copy-of select="@*"/>
			<!--xsl:copy-of select="*"/-->
		</xsl:copy>
	</xsl:template>
</xsl:stylesheet>

What I want to achieve:

  1. I have a “ProtocolTemplate” object with Child rows which represents “Definition of Measured Parameters”
  2. I create my “Protocol” which I fill with predefined “Measured Parameters”
  3. If I change “ProtocolTemplate’s” Parameters “Definition of Measured Parameters”, I want to refresh the list of parameters of “Protocol” by clicking “reload parameters” button.

I would expect:

  1. New parameters are added
  2. Deprecated parameters are deleted

In case the delete is not supported, I can imagine to configure “Active” field which would cause the parameters would not be visible anymore in protocol.

Thank you,
David

Deleting with an action button is supported. But you need to set MergeType to FullMerge. I updated the documentation. See Sequential Workflow Action.