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

ActionField1680

Beschrijving: Check if vendor on Servicecontract may be changed. Custom: Nee

Propertiesbewerken

Property Type Accessor
ServiceContract ServiceContract Root

XMLbewerken

<Workflow Name="ActionField1680" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Check if vendor on Servicecontract may be changed.</Description>
	<Properties>
		<Property	Name="ServiceContract"			Type="ServiceContract"				Accessor="Root"		Direction="In" />

		<Property	Name="ServiceContractLineCount"	Type="Int64"						Accessor="Internal"						Default="0" />
		<Property	Name="ServiceContractLines"		Type="List[ServiceContractLine]"	Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Transaction>
			<GetCount Name="Count ServiceContractLines" Type="ServiceContractLine" OutputProperty="${ServiceContractLineCount}">
				<Filters>
					<PropertyFilter	PropertyName="Id.ServiceContract"	Operator="="		PropertyValue="${ServiceContract}" />
				</Filters>
			</GetCount>

			<When Name="Count gt 0" Condition="${ServiceContractLineCount} &gt; 0">
				<GetList Name="ServiceContractLines" Type="ServiceContractLine" OutputProperty="${ServiceContractLines}" OrderBy="Id" OrderDirection="Ascending" Top="1">
					<Filters>
						<PropertyFilter	PropertyName="Id.ServiceContract"	Operator="="		PropertyValue="${ServiceContract}" />
						<NotFilter>
							<PropertyEmptyFilter PropertyName="Vendor" />
						</NotFilter>
					</Filters>
				</GetList>

				<Assign Name="Set ServiceContract.Vendor" Property="${ServiceContract.Vendor}" Value="${ServiceContractLines[0].Vendor?}" />
			</When>
		</Transaction>

		<When Name="Count gt 0" Condition="${ServiceContractLineCount} &gt; 0">
			<Message Name="Vendor may not be changed" MessageCode="3248">
				<Parameter	Name="ServiceContract"	Direction="In"		Value="${ServiceContract}" />
			</Message>
		</When>

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