Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1822
ActionField1822
Beschrijving: Validate changing job on picklist Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| PickList | PickList | Root |
XMLbewerken
<Workflow Name="ActionField1822" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Validate changing job on picklist</Description>
<Properties>
<Property Name="PickList" Type="PickList" Accessor="Root" Direction="In" />
<Property Name="DeleteQuestion" Type="RequestResult" Accessor="Internal" />
<Property Name="DifferentJob" Type="Boolean" Accessor="Internal" />
<Property Name="PickListLines" Type="List[PickListLine]" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<GetList Name="PickListsLinesForThisPickList" Type="PickListLine" OutputProperty="${PickListLines}" OrderBy="Id.LineId" OrderDirection="Ascending" Comment="Search for PickListsLines linked with PickList">
<Filters>
<PropertyFilter PropertyName="Id.PickList" Operator="=" PropertyValue="${PickList}" />
</Filters>
</GetList>
</Transaction>
<When Name="Picklist lines" Condition="${PickListLines} != Empty && ${PickListLines.Count} > 0">
<ForEach Name="PickListLine" In="${PickListLines}" As="PickListLine" Condition="${DifferentJob} == False && ${PickListLine.JobMaterial.Id.Job} != ${PickList.Job}">
<Assign Name="DifferentJob" Property="${DifferentJob}" Value="True" />
</ForEach>
<When Name="DifferentJob found" Condition="${DifferentJob}">
<Question Name="AskIfCanDelete" Type="YesNo" MessageCode="3772" Default="No" OutputProperty="${DeleteQuestion}">
<Parameter Name="Job" Direction="In" Value="${PickListLines[0].JobMaterial.Id.Job}" />
<Parameter Name="PickList" Direction="In" Value="${PickList}" />
</Question>
<Transaction>
<Choose Name="Check if continue">
<When Name="ContinueYes" Condition="${DeleteQuestion} == Yes">
<ForEach Name="DeletePickListLines" In="${PickListLines}" As="PickListLineToDelete">
<DeleteObject Name="DeletePickListLine" DomainObject="${PickListLineToDelete}" />
</ForEach>
</When>
<Otherwise Name="ContinueNo">
<Assign Name="Reset Job" Property="${PickList.Job}" Value="${PickListLines[0].JobMaterial.Id.Job}" />
<Stop Name="Stop" Mode="EndAll" />
</Otherwise>
</Choose>
</Transaction>
</When>
</When>
<UserContent Name="Post" />
</Execution>
</Workflow>