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

ActionField955

Beschrijving: Change settings for ContractLine (via screen). Custom: Nee

Propertiesbewerken

Property Type Accessor
ContractLine ContractLine Root

XMLbewerken

<Workflow Name="ActionField955" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Change settings for ContractLine (via screen).</Description>
	<Properties>
		<Property	Name="ContractLine"				Type="ContractLine"				Accessor="Root"		Direction="In" />

		<Property	Name="ChargeFrequency"			Type="FrequencyPreset"			Accessor="Internal" />
		<Property	Name="ChargeMoment"				Type="FrequencyPreset"			Accessor="Internal" />
		<Property	Name="ContractLineCostMutation"	Type="ContractLineCostMutation"	Accessor="Internal" />
		<Property	Name="InternalChargeLineCount"	Type="Int64"					Accessor="Internal" />
		<Property	Name="StartDate"				Type="Date"						Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Validation Name="ValidateNoEnddateForContractLine" Condition="${ContractLine.InvoiceOnce} == True || ${ContractLine.EndDate} == Empty" MessageCode="1790">
			<Parameter	Name="ContractLine"	Direction="In"		Value="${ContractLine}" />
		</Validation>
		<Validation Name="StartDateChargePeriod past StartDate" Condition="${ContractLine.StartDateChargePeriod} == Empty || ${ContractLine.StartDate} == ${ContractLine.StartDateChargePeriod}" MessageCode="1822">
			<Parameter	Name="ContractLine"	Direction="In"		Value="${ContractLine}" />
		</Validation>

		<Transaction>
			<GetCount Name="There may be InternalChargeLines that have not yet been approved (but might be approved soon). So check whether there are any InternalChargeLines that have a PeriodTillDate that lies past the old StartDate of the ContractLine" Type="InternalChargeLine" OutputProperty="${InternalChargeLineCount}">
				<Filters>
					<PropertyFilter	PropertyName="PeriodTillDate"	Operator="&gt;="	PropertyValue="${ContractLine.StartDate}" />
					<PropertyFilter	PropertyName="ContractLine.Id"	Operator="="		PropertyValue="${ContractLine.Id}" />
					<PropertyFilter	PropertyName="Status"			Operator="="		PropertyValue="InternalChargeLineStatus.Open" />
				</Filters>
			</GetCount>

			<Validation Name="ValidateNoOpenInternalChargeLines" Condition="${InternalChargeLineCount} == 0" MessageCode="1825">
				<Parameter	Name="ContractLine"	Direction="In"		Value="${ContractLine}" />
			</Validation>

			<Assign Name="Save StartDate as we need it later to check whether it is changed" Property="${StartDate}" Value="${ContractLine.StartDate}" />
			<Assign Name="Save ChargeFrequency as we need it later to check whether it is changed" Property="${ChargeFrequency}" Value="${ContractLine.ChargeFrequency}" />
			<Assign Name="Save ChargeMoment as we need it later to check whether it is changed" Property="${ChargeMoment}" Value="${ContractLine.ChargeMoment}" />
		</Transaction>

		<SystemDialog Name="ChangeSettingsForContractLine" DialogName="DataEntryScreen">
			<Parameter	Name="DomainObject"	Direction="In"		Value="${ContractLine}" />
			<Parameter	Name="ScreenName"	Direction="In"		Value="conl03" />
		</SystemDialog>

		<When Name="When StartDate is changed" Condition="${ContractLine.StartDate} != ${StartDate} || ${ContractLine.ChargeFrequency} != ${ChargeFrequency} || ${ContractLine.ChargeMoment} != ${ChargeMoment}">
			<When Name="When Startdate ContractLine is before StartDate RRE" Condition="${ContractLine.StartDate} &lt; ${ContractLine.ServiceContract.Space.RentableRealEstateStartDate}">
				<Message Name="Startdate ContractLine is before StartDate RRE" MessageCode="1777">
					<Parameter	Name="ContractLine"	Direction="In"		Value="${ContractLine}" />
					<Parameter	Name="Space"		Direction="In"		Value="${ContractLine.ServiceContract.Space}" />
				</Message>

				<Transaction>
					<Assign Name="Reset StartDate back to before dialog" Property="${ContractLine.StartDate}" Value="${StartDate}" />
				</Transaction>

				<Stop Name="Stop" Mode="Abort" />
			</When>

			<Transaction>
				<WorkflowCall Name="Check and move initial ContractLineCostMutation" WorkflowName="ContractLine_CheckAndMoveMutation">
					<Parameter	Name="ContractLine"			Direction="In"		Value="${ContractLine}" />
					<Parameter	Name="NewStartDate"			Direction="In"		Value="${ContractLine.StartDate}" />
					<Parameter	Name="OriginalStartDate"	Direction="In"		Value="${StartDate}" />
				</WorkflowCall>

				<Assign Name="Set StartDateChargePeriod" Property="${ContractLine.StartDateChargePeriod}" Value="${ContractLine.StartDate}" />

				<Command Name="ContractLine_CalculateDatesRelevantToCharging" CommandName="ContractLine_CalculateDatesRelevantToCharging" Comment="not only the startdate may have been changed, but also chargemoment or frequency, so calculate dates">
					<Parameter	Name="ContractLine"						Direction="In"		Value="${ContractLine}" />
					<Parameter	Name="RecalculateStartDateChargePeriod"	Direction="In"		Value="False" />
				</Command>
			</Transaction>
		</When>

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