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

ActionField337

Beschrijving: Create Purchase(Line) with status Created for Article (setting StockLevelPerSite must be False). Custom: Nee

Propertiesbewerken

Property Type Accessor
Article Article Root
FormName UltimoString Optional
PurchaseContext Context Optional

XMLbewerken

<Workflow Name="ActionField337" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create Purchase(Line) with status Created for Article (setting StockLevelPerSite must be False).</Description>
	<Properties>
		<Property	Name="Article"			Type="Article"		Accessor="Root"		Direction="In" />

		<Property	Name="FormName"			Type="UltimoString"	Accessor="Optional"	Direction="In"		Default="pch02"	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="IsNewPurchase"	Type="Boolean"		Accessor="Internal" />
		<Property	Name="Purchase"			Type="Purchase"		Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="Stocklevel per site" Condition="#{UltimoSettings.StockLevelPerSite} == False" MessageCode="0524" />

		<WorkflowCall Name="Create Purchase" WorkflowName="Article_CreatePurchase">
			<Parameter	Name="Article"			Direction="In"		Value="${Article}" />
			<Parameter	Name="PurchaseContext"	Direction="In"		Value="${PurchaseContext}" />
			<Parameter	Name="PurchaseStatus"	Direction="In"		Value="PurchaseStatus.Created" />
			<Parameter	Name="Purchase"			Direction="Out"										OutputProperty="${Purchase}" />
			<Parameter	Name="PurchaseCreated"	Direction="Out"										OutputProperty="${IsNewPurchase}" />
		</WorkflowCall>

		<UserContent Name="Post" />

		<Choose Name="choose new purchase">
			<When Name="New Purchase" Condition="${IsNewPurchase} == True">
				<Message Name="MSG New Purchase" MessageCode="0519">
					<Parameter	Name="Article"	Direction="In"		Value="${Article}" />
					<Parameter	Name="Purchase"	Direction="In"		Value="${Purchase}" />
				</Message>
			</When>

			<Otherwise Name="No New Purchase">
				<Message Name="MSG Added Purchase" MessageCode="0518">
					<Parameter	Name="Article"	Direction="In"		Value="${Article}" />
					<Parameter	Name="Purchase"	Direction="In"		Value="${Purchase}" />
				</Message>
			</Otherwise>
		</Choose>

		<View Name="Open form" 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>