Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1263
ActionField1263
Beschrijving: Select a ObjectJobPlan (product) and add it to the ServiceDeskReportType by creating a link (ServiceDeskReportTypeJobPlan) between the product template (JobPlan) and the ServiceDeskReportType. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| ServiceDeskReportType | ServiceDeskReportType | Root |
| AllowSpecificProducts | Boolean | Optional |
XMLbewerken
<Workflow Name="ActionField1263" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Select a ObjectJobPlan (product) and add it to the ServiceDeskReportType by creating a link (ServiceDeskReportTypeJobPlan) between the product template (JobPlan) and the ServiceDeskReportType.</Description>
<Properties>
<Property Name="ServiceDeskReportType" Type="ServiceDeskReportType" Accessor="Root" Direction="In" />
<Property Name="AllowSpecificProducts" Type="Boolean" Accessor="Optional" Direction="In" Default="False" Comment="Set to True to allow products with specific brand/type or manufacture year" />
<Property Name="AdditionalSqlWhereClause" Type="UltimoString" Accessor="Internal" />
<Property Name="FilterJobPlanContexts" Type="List[Context]" Accessor="Internal" />
<Property Name="JobPlans" Type="QueryResult" Accessor="Internal" />
<Property Name="SelectedObjectJobPlan" Type="ObjectJobPlan" Accessor="Internal" />
<Property Name="ServiceDeskReportTypeJobPlan" Type="ServiceDeskReportTypeJobPlan" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<Validation Name="Validate context fleet" Condition="${ServiceDeskReportType.BackOffice} == Empty || ${ServiceDeskReportType.BackOffice.JobContext?} == JobContext.Fleet" MessageCode="2795" />
<Assign Name="Set FilterJobPlanContexts" Property="${FilterJobPlanContexts}" Value="${ServiceDeskReportType.BackOffice.FilterJobPlanContexts?}" />
<When Name="Allowed to find jobplan at all" Condition="${FilterJobPlanContexts} != Empty">
<Query Name="Query the Ids of all ObjectJobPlans suitable for this ServiceDeskReportType" Type="ObjectJobPlan" OrderBy="Id" OrderDirection="Ascending" OutputProperty="${JobPlans}">
<Joins>
<Join Name="JobPlan" Alias="jp" Type="InnerJoin" />
<Join Name="jp.SkillCategory" Alias="skc" Type="LeftOuterJoin" />
</Joins>
<Filters>
<PropertyFilter PropertyName="jp.Status" Operator=">=" PropertyValue="0" Comment="Do not include trashed records" />
<WhenFilter Condition="${AllowSpecificProducts} == False">
<CombinedFilter FilterOperator="And">
<PropertyEmptyFilter PropertyName="FinishingType" />
<PropertyFilter PropertyName="ManufactureYearFrom" Operator="=" PropertyValue="0" Comment="A value of zero is considered 'empty'" />
<PropertyFilter PropertyName="ManufactureYearTill" Operator="=" PropertyValue="0" Comment="A value of zero is considered 'empty'" />
</CombinedFilter>
</WhenFilter>
<WhenFilter Condition="${ServiceDeskReportType.SkillCategory} != Empty">
<CombinedFilter FilterOperator="Or">
<PropertyEmptyFilter PropertyName="jp.SkillCategory" />
<PropertyFilter PropertyName="skc.Id" Operator="=" PropertyValue="${ServiceDeskReportType.SkillCategory}" />
</CombinedFilter>
</WhenFilter>
<InFilter PropertyName="jp.Context" Values="${FilterJobPlanContexts}" />
</Filters>
<Properties>
<Property Name="Id" Alias="id" Type="GroupProperty" />
</Properties>
</Query>
</When>
</Transaction>
<Validation Name="ValidateJobPlansFoundForServiceDeskReportType" Condition="${JobPlans} != Empty && ${JobPlans.Count} != 0" MessageCode="2687">
<Parameter Name="ServiceDeskReportType" Direction="In" Value="${ServiceDeskReportType}" />
</Validation>
<Assign Name="Build additional SQL WHERE clause" Property="${AdditionalSqlWhereClause}" Value=" AND ObjjpId IN (#foreach(${JobPlan} in ${JobPlans})#each'${JobPlan.id}'#between,#end)" />
<SystemDialog Name="DialogSelectObjectJobPlan" DialogName="SelectDomainObject">
<Parameter Name="EntityName" Direction="In" Value="ObjectJobPlan" />
<Parameter Name="SelectionListConfiguration" Direction="In" Value="Default" />
<Parameter Name="SqlWhereClause" Direction="In" Value="ObjjpRecStatus >= 0${AdditionalSqlWhereClause}" Comment="status not Trash/Delete AND suitable for report type" />
<Parameter Name="DomainObject" Direction="Out" OutputProperty="${SelectedObjectJobPlan}" />
</SystemDialog>
<Transaction>
<WorkflowCall Name="Create a link (ServiceDeskReportTypeJobPlan) between the selected product template (JobPlan) and the ServiceDeskReportType" WorkflowName="ServiceDeskReportTypeJobPlan_LinkJobPlanToServiceDeskReportType">
<Parameter Name="JobPlan" Direction="In" Value="${SelectedObjectJobPlan.JobPlan}" />
<Parameter Name="ServiceDeskReportType" Direction="In" Value="${ServiceDeskReportType}" />
<Parameter Name="ServiceDeskReportTypeJobPlan" Direction="Out" OutputProperty="${ServiceDeskReportTypeJobPlan}" />
</WorkflowCall>
<When Name="When skill category is set on product" Condition="${SelectedObjectJobPlan.JobPlan.SkillCategory} != Empty">
<Assign Name="Copy to report type" Property="${ServiceDeskReportType.SkillCategory}" Value="${SelectedObjectJobPlan.JobPlan.SkillCategory}" />
</When>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>