Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1124
ActionField1124
Beschrijving: Delete ReceiptLines of a certain Purchase linked to this Receipt. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| Receipt | Receipt | Root |
XMLbewerken
<Workflow Name="ActionField1124" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Delete ReceiptLines of a certain Purchase linked to this Receipt.</Description>
<Properties>
<Property Name="Receipt" Type="Receipt" Accessor="Root" Direction="In" />
<Property Name="AllReceiptLines" Type="List[ReceiptLine]" Accessor="Internal" />
<Property Name="PurchaseChosen" Type="Purchase" Accessor="Internal" />
<Property Name="ReceiptLines" Type="List[ReceiptLine]" Accessor="Internal" />
<Property Name="ReceiptLinesWithOtherPurchaseCodeCount" Type="Int64" Accessor="Internal" />
<Property Name="WhereClause" Type="UltimoString" Accessor="Internal" Default="exists (select PchlPchId from dba.PurchaseLine where exists (select rcplpchid from dba.ReceiptLine where RcplRcpId = '${Receipt.Id}' and rcplpchid = PchlPchId) and PchlPchId = PchId)" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<GetList Name="Get ReceiptsLines on invoice" Type="ReceiptLine" OutputProperty="${AllReceiptLines}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.Receipt" Operator="=" PropertyValue="${Receipt}" />
</Filters>
</GetList>
</Transaction>
<When Name="Receipt lines are found" Condition="${AllReceiptLines.Count} > 0">
<Transaction>
<Assign Name="PurchaseChosen" Property="${PurchaseChosen}" Value="=#getpropertyvalue(#elementat(${AllReceiptLines}, 0), 'PurchaseLine.Id.Purchase')" />
<GetCount Name="Get ReceiptsLines on invoice" Type="ReceiptLine" OutputProperty="${ReceiptLinesWithOtherPurchaseCodeCount}">
<Filters>
<PropertyFilter PropertyName="Id.Receipt" Operator="=" PropertyValue="${Receipt}" />
<NotFilter>
<PropertyFilter PropertyName="PurchaseLine.Id.Purchase.Id" Operator="=" PropertyValue="${PurchaseChosen}" />
</NotFilter>
</Filters>
</GetCount>
</Transaction>
<When Name="Several Purchases are found" Condition="${ReceiptLinesWithOtherPurchaseCodeCount} > 0">
<SystemDialog Name="SelectDomainObject" DialogName="SelectDomainObject">
<Parameter Name="EntityName" Direction="In" Value="Purchase" />
<Parameter Name="SelectionListConfiguration" Direction="In" Value="Default" />
<Parameter Name="SqlWhereClause" Direction="In" Value="${WhereClause}" />
<Parameter Name="DomainObject" Direction="Out" OutputProperty="${PurchaseChosen}" />
</SystemDialog>
</When>
<ContinuationQuestion Name="Continue Purchase" MessageCode="2345">
<Parameter Name="DomainObject" Direction="In" Value="${PurchaseChosen}" />
</ContinuationQuestion>
<Transaction>
<GetList Name="Get ReceiptLines" Type="ReceiptLine" OutputProperty="${ReceiptLines}" OrderBy="Id" OrderDirection="Ascending">
<Joins>
<Join Name="PurchaseLine" Alias="purchaseLine" Type="InnerJoin" />
<Join Name="purchaseLine.Id.Purchase" Alias="purchase" Type="InnerJoin" />
</Joins>
<Filters>
<PropertyFilter PropertyName="Id.Receipt" Operator="=" PropertyValue="${Receipt}" />
<PropertyFilter PropertyName="purchase.Id" Operator="=" PropertyValue="${PurchaseChosen}" />
</Filters>
</GetList>
<ForEach Name="Loop ReceiptLines" In="${ReceiptLines}" As="ReceiptLine">
<DeleteObject Name="Delete found receiptLine" DomainObject="${ReceiptLine}" />
</ForEach>
</Transaction>
</When>
<UserContent Name="Post" />
</Execution>
</Workflow>