Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1806
ActionField1806
Beschrijving: Change EquipmentSparePart by an alternative article. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| EquipmentSparePart | EquipmentSparePart | Root |
XMLbewerken
<Workflow Name="ActionField1806" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Change EquipmentSparePart by an alternative article.</Description>
<Properties>
<Property Name="EquipmentSparePart" Type="EquipmentSparePart" Accessor="Root" Direction="In" />
<Property Name="AlternativeArticle" Type="ObjectArticle" Accessor="Internal" />
<Property Name="Label" Type="UltimoString" Accessor="Internal" />
<Property Name="NewEquipmentSparePart" Type="EquipmentSparePart" Accessor="Internal" />
<Property Name="SqlWhereClause" Type="UltimoString" Accessor="Internal" Default="ObjArtArtid = '${EquipmentSparePart.Id.Article.Id}' AND ObjArtContext = 2 AND ObjArtAlternativeArtId not in (select EqmspArtId from dba.EqmSparePart where EqmspEqmId = '${EquipmentSparePart.Id.Equipment.Id}')" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<Command Name="Get translated label for pinned marker description" CommandName="GetLabel">
<Parameter Name="LabelCode" Direction="In" Value="SELECTALTERNATIVEARTICLE" />
<Parameter Name="LabelValue" Direction="Out" OutputProperty="${Label}" />
</Command>
</Transaction>
<SystemDialog Name="DialogSelectObjectArticles" DialogName="SelectDomainObject">
<Parameter Name="EntityName" Direction="In" Value="ObjectArticle" />
<Parameter Name="SelectionListConfiguration" Direction="In" Value="ALTERNATIVE" />
<Parameter Name="SqlWhereClause" Direction="In" Value="${SqlWhereClause}" />
<Parameter Name="Title" Direction="In" Value="${Label}" />
<Parameter Name="DomainObject" Direction="Out" OutputProperty="${AlternativeArticle}" />
</SystemDialog>
<Transaction>
<GetItem Name="Get EquipmentSparePart" Type="EquipmentSparePart" OutputProperty="${NewEquipmentSparePart}">
<Filters>
<PropertyFilter PropertyName="Id.Article" Operator="=" PropertyValue="${AlternativeArticle.AlternativeArticle}" />
<PropertyFilter PropertyName="Id.Equipment" Operator="=" PropertyValue="${EquipmentSparePart.Id.Equipment}" />
</Filters>
</GetItem>
<When Name="EquipmentSparePart does not exists" Condition="${NewEquipmentSparePart} == Empty">
<Insert Name="NewEquipmentSparePart" ObjectType="EquipmentSparePart" OutputProperty="${NewEquipmentSparePart}">
<Parameter Name="Id.Article" Direction="In" Value="${AlternativeArticle.AlternativeArticle}" />
<Parameter Name="Id.Equipment" Direction="In" Value="${EquipmentSparePart.Id.Equipment}" />
<Parameter Name="Context" Direction="In" Value="${EquipmentSparePart.Context}" />
<Parameter Name="Status" Direction="In" Value="${EquipmentSparePart.Status}" />
</Insert>
<Copy Name="Copy EquipmentSparePart" Source="${EquipmentSparePart}" Target="${NewEquipmentSparePart}" CopyType="Overwrite" CustomOnly="False" />
<Assign Name="WarehouseServeOutQuantity = 0" Property="${NewEquipmentSparePart.WarehouseServeOutQuantity}" Value="0" />
</When>
<DeleteObject Name="Delete EquipmentSparePart" DomainObject="${EquipmentSparePart}" />
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>