Categorie: reference Bijgewerkt: 2026-04-08 actionfield workflow actionfield990

ActionField990

Beschrijving: Create a Job for ObjectDamage. Copy Description, Equipment, ProcessFunction and Building from ObjectDamage to Job. Copy CostCarriers from Building or Equipment to Job. Custom: Nee

Propertiesbewerken

Property Type Accessor
ObjectDamage ObjectDamage Root
FormName String Optional
JobContext Context Optional

XMLbewerken

<Workflow Name="ActionField990" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create a Job for ObjectDamage. Copy Description, Equipment, ProcessFunction and Building from ObjectDamage to Job. Copy CostCarriers from Building or Equipment to Job.</Description>
	<Properties>
		<Property	Name="ObjectDamage"	Type="ObjectDamage"	Accessor="Root"		Direction="In" />

		<Property	Name="FormName"		Type="String"		Accessor="Optional"	Direction="In"								Comment="Open this screen with created Job" />
		<Property	Name="JobContext"	Type="Context"		Accessor="Optional"	Direction="In"		Default="JobContext.TD"	Comment="Create the Job with this context" />

		<Property	Name="CreatedJob"	Type="Job"			Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="ValidateJobNotPresentOnDomainObject" Condition="${ObjectDamage.Job} == Empty" MessageCode="1898">
			<Parameter	Name="DomainObject"	Direction="In"		Value="${ObjectDamage}" />
		</Validation>

		<WorkflowCall Name="Job_CreateAndInitialize" WorkflowName="Job_CreateAndInitialize">
			<Parameter	Name="Building"			Direction="In"		Value="${ObjectDamage.Building}" />
			<Parameter	Name="Equipment"		Direction="In"		Value="${ObjectDamage.Equipment}" />
			<Parameter	Name="JobContext"		Direction="In"		Value="${JobContext}" />
			<Parameter	Name="JobCreateMethod"	Direction="In"		Value="CreateStandard" />
			<Parameter	Name="ProcessFunction"	Direction="In"		Value="${ObjectDamage.ProcessFunction}" />
			<Parameter	Name="Job"				Direction="Out"												OutputProperty="${CreatedJob}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_WarnIfStartOrTargetDateIsInThePast" WorkflowName="Job_WarnIfStartOrTargetDateIsInThePast">
			<Parameter	Name="Job"	Direction="In"		Value="${CreatedJob}" />
		</WorkflowCall>

		<WorkflowCall Name="Job_WarnIfTargetDateIsPastSLATargetDate" WorkflowName="Job_WarnIfTargetDateIsPastSLATargetDate">
			<Parameter	Name="Job"	Direction="In"		Value="${CreatedJob}" />
		</WorkflowCall>

		<Transaction>
			<Choose Name="when workflow is called with Building on ObjectDamage">
				<When Name="if Building is not empty" Condition="${ObjectDamage.Building} != Empty">
					<WorkflowCall Name="Job_CopyCostunitsFromBuilding" WorkflowName="Job_CopyCostunitsFromBuilding">
						<Parameter	Name="Job"	Direction="In"		Value="${CreatedJob}" />
					</WorkflowCall>
				</When>

				<Otherwise Name="no Building on ObjectDamage, check for Equipment instead">
					<When Name="if Equipment is not empty" Condition="${ObjectDamage.Equipment} != Empty">
						<Command Name="Job_FindDepartmentCostCenterAndCustomer" CommandName="Job_FindDepartmentCostCenterAndCustomer">
							<Parameter	Name="Job"	Direction="In"		Value="${CreatedJob}" />
						</Command>
					</When>
				</Otherwise>
			</Choose>

			<Assign Name="Copy Description from ObjectDamage grid to newly created job" Property="${CreatedJob.Description}" Value="${ObjectDamage.Description}" />
			<Assign Name="Attach newly created job to ObjectDamage" Property="${ObjectDamage.Job}" Value="${CreatedJob}" />
		</Transaction>

		<UserContent Name="Post" />

		<View Name="OpenScreen" ViewName="DataEntryScreen">
			<Parameter	Name="DomainObject"			Direction="In"		Value="${CreatedJob}" />
			<Parameter	Name="FocusEditableField"	Direction="In"		Value="=${CreatedJob.Description} == Empty" />
			<Parameter	Name="ScreenName"			Direction="In"		Value="${FormName}" />
		</View>
	</Execution>
</Workflow>