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

ActionField113

Beschrijving: Create Purchase with status Created for a Job (Job status must be Created, Approved or Active) and open the created Purchase. Custom: Nee

Propertiesbewerken

Property Type Accessor
Job Job Root
FormName String Optional
PurchaseContext Context Optional

XMLbewerken

<Workflow Name="ActionField113" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create Purchase with status Created for a Job (Job status must be Created, Approved or Active) and open the created Purchase.</Description>
	<Properties>
		<Property	Name="Job"				Type="Job"		Accessor="Root"		Direction="In" />

		<Property	Name="FormName"			Type="String"	Accessor="Optional"	Direction="In"		Comment="Open this screen with the created Purchase" />
		<Property	Name="PurchaseContext"	Type="Context"	Accessor="Optional"	Direction="In"		Comment="Create Purchase with this context" />

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

		<Validation Name="JobStatus OK?" Condition="${Job.Status} == JobStatus.Created || ${Job.Status} == JobStatus.Approved || ${Job.Status} == JobStatus.Active || ${Job.Status} == JobStatus.Finished" MessageCode="0578">
			<Parameter	Name="Job"				Direction="In"		Value="${Job}" />
			<Parameter	Name="PurchaseContext"	Direction="In"		Value="${PurchaseContext}" />
		</Validation>

		<Transaction>
			<Insert Name="Create purchase" ObjectType="Purchase" OutputProperty="${Purchase}">
				<Parameter	Name="Context"	Direction="In"		Value="${PurchaseContext}" />
				<Parameter	Name="Status"	Direction="In"		Value="PurchaseStatus.Created" />
				<Parameter	Name="Job"		Direction="In"		Value="${Job}" />
				<Parameter	Name="Site"		Direction="In"		Value="${Job.Site}" />
			</Insert>
		</Transaction>

		<UserContent Name="Post" />

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