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

ActionField1779

Beschrijving: this actionfield fires when changing the site on the PurchaseRequest. Custom: Nee

Propertiesbewerken

Property Type Accessor
PurchaseRequest PurchaseRequest Root

XMLbewerken

<Workflow Name="ActionField1779" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>this actionfield fires when changing the site on the PurchaseRequest.</Description>
	<Properties>
		<Property	Name="PurchaseRequest"		Type="PurchaseRequest"				Accessor="Root"		Direction="In" />

		<Property	Name="ArticleSite"			Type="ArticleSite"					Accessor="Internal" />
		<Property	Name="PurchasePrice"		Type="CompanyMoney"					Accessor="Internal"						Default="CompanyMoney.Zero" />
		<Property	Name="PurchaseRequestLines"	Type="List[PurchaseRequestLine]"	Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<When Name="PurchasePricePerSite is True" Condition="#{UltimoSettings.PurchasePricePerSite} == True">
			<Transaction>
				<GetList Name="PurchaseRequestLine" Type="PurchaseRequestLine" OutputProperty="${PurchaseRequestLines}" OrderBy="Id" OrderDirection="Ascending">
					<Filters>
						<NotFilter>
							<PropertyEmptyFilter PropertyName="Article" />
						</NotFilter>
						<PropertyFilter	PropertyName="PurchaseRequest"	Operator="="		PropertyValue="${PurchaseRequest}" />
					</Filters>
				</GetList>

				<ForEach Name="Loop PurchaseRequestLines" In="${PurchaseRequestLines}" As="PurchaseRequestLine">
					<WorkflowCall Name="Article(Site) get PurchasePrice" WorkflowName="Article_GetPurchasePrice">
						<Parameter	Name="Article"			Direction="In"		Value="${PurchaseRequestLine.Article}" />
						<Parameter	Name="Site"				Direction="In"		Value="${PurchaseRequest.Site}" />
						<Parameter	Name="PurchasePrice"	Direction="Out"												OutputProperty="${PurchasePrice}" />
					</WorkflowCall>

					<Assign Name="Set PurchaseRequestLine GrossPrice Price" Property="${PurchaseRequestLine.GrossPrice}" Value="${PurchasePrice}" />

					<WorkflowCall Name="PurchaseRequestLine_CalculateAmounts" WorkflowName="PurchaseRequestLine_CalculateAmounts">
						<Parameter	Name="PurchaseRequestLine"	Direction="In"		Value="${PurchaseRequestLine}" />
					</WorkflowCall>
				</ForEach>

				<WorkflowCall Name="PurchaseRequest_UpdateTotalPrice" WorkflowName="PurchaseRequest_UpdateTotalPrice">
					<Parameter	Name="PurchaseRequest"	Direction="In"		Value="${PurchaseRequest}" />
				</WorkflowCall>
			</Transaction>
		</When>

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