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

ActionField293

Beschrijving: Change CostCenter of a Job via dialog (Job must not be linked to a Project, nor have status Closed). Custom: Nee

Propertiesbewerken

Property Type Accessor
Job Job Root

XMLbewerken

<Workflow Name="ActionField293" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Change CostCenter of a Job via dialog (Job must not be linked to a Project, nor have status Closed).</Description>
	<Properties>
		<Property	Name="Job"							Type="Job"				Accessor="Root"		Direction="In" />

		<Property	Name="DoContinue"					Type="RequestResult"	Accessor="Internal" />
		<Property	Name="HasInvoices"					Type="Boolean"			Accessor="Internal" />
		<Property	Name="NewCostCenter"				Type="CostCenter"		Accessor="Internal" />
		<Property	Name="NewCostCenterSqlWhereClause"	Type="String"			Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Choose Name="ChooseJobProject">
			<When Name="Job_Has_Project" Condition="${Job.Project} != Empty">
				<Message Name="Job_Has_Project" MessageCode="0261" />
			</When>

			<Otherwise Name="No_Project">
				<Choose Name="ChooseJobClosed">
					<When Name="Job_Has_Status_Closed" Condition="${Job.Status} == JobStatus.Closed">
						<Message Name="Job_Is_Closed" MessageCode="0262" />
					</When>

					<Otherwise Name="not_Closed">
						<Transaction>
							<Command Name="Job_CheckForJobDetailRowsInInvoiceOut" CommandName="Job_CheckForJobDetailRowsInInvoiceOut">
								<Parameter	Name="Job"			Direction="In"		Value="${Job}" />
								<Parameter	Name="HasInvoices"	Direction="Out"						OutputProperty="${HasInvoices}" />
							</Command>
						</Transaction>

						<When Name="ChooseHasInvoices » WhenHasInvoices" Condition="${HasInvoices} == True">
							<Question Name="Continue" Type="YesNo" MessageCode="0264" OutputProperty="${DoContinue}" />

							<When Name="CheckDoContinue » Continue_Is_Not_Yes" Condition="${DoContinue} != Yes">
								<Stop Name="Stop" Mode="Abort" />
							</When>
						</When>

						<Dialog Name="NewCostCenter" TitleCode="SELECT_COSTCENTER">
							<Container>
								<SelectionList Name="NewCostCenter" OutputProperty="${NewCostCenter}" ColumnName="CcrId" ViewfieldConfiguration="Default" SqlWhereClause="${NewCostCenterSqlWhereClause}" />
							</Container>
						</Dialog>

						<Transaction>
							<Command Name="Job_ChangeCostCenter" CommandName="Job_ChangeCostCenter">
								<Parameter	Name="Job"				Direction="In"		Value="${Job}" />
								<Parameter	Name="NewCostCenter"	Direction="In"		Value="${NewCostCenter}" />
							</Command>
						</Transaction>

						<Message Name="CostCenterChanged" MessageCode="0263">
							<Parameter	Name="NewCostCenter"	Direction="In"		Value="${NewCostCenter}" />
						</Message>
					</Otherwise>
				</Choose>
			</Otherwise>
		</Choose>

		<UserContent Name="Post" />
	</Execution>
</Workflow>