Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1282
ActionField1282
Beschrijving: Copy BudgetPeriods for all CostCenters. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| CopyDeviations | Boolean | Optional |
| IncludeMutations | Boolean | Optional |
XMLbewerken
<Workflow Name="ActionField1282" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Copy BudgetPeriods for all CostCenters.</Description>
<Properties>
<Property Name="CopyDeviations" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Sets the default value for the checkbox CopyDeviations in dialog. True: the deviations will be copied. False: all months are balanced (the rounding occurs in the last month of the quarter)" />
<Property Name="IncludeMutations" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Sets the default value for the checkbox IncludeMutations in dialog. True: the budget mutation will be included. False: original budget is used" />
<Property Name="BudgetPeriods" Type="List[BudgetPeriod]" Accessor="Internal" />
<Property Name="DomainGlobals" Type="DomainGlobals" Accessor="Internal" Default="#{UltimoSettings.Id}" />
<Property Name="FoundYears" Type="QueryResult" Accessor="Internal" />
<Property Name="FromYear" Type="Int32" Accessor="Internal" />
<Property Name="FromYears" Type="List[Int32]" Accessor="Internal" />
<Property Name="ToYear" Type="Int32" Accessor="Internal" />
<Property Name="ToYears" Type="List[Int32]" Accessor="Internal" Default="=#range(#getyear(${DomainGlobals.StartDateFinanceYear}) , 7)" />
<Property Name="UnapprovedBudgetPeriodMutations" Type="Int64" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<Query Name="Get Years" Type="BudgetPeriod" OrderBy="Year" OrderDirection="Descending" Top="5" OutputProperty="${FoundYears}">
<Filters>
<PropertyFilter PropertyName="Context" Operator="=" PropertyValue="BudgetPeriodContext.Year" />
<PropertyFilter PropertyName="Status" Operator="=" PropertyValue="BudgetPeriodStatus.Approved" />
</Filters>
<Properties>
<Property Name="Year" Alias="year" Type="GroupProperty" />
</Properties>
</Query>
<ForEach Name="Year" In="${FoundYears}" As="Year">
<AddToList Name="Add year" List="${FromYears}" Item="${Year.year}" />
</ForEach>
</Transaction>
<Dialog Name="CopyBudgetPeriods" TitleCode="COPYBUDGETPERIOD" LabelWidth="275">
<Container Border="True">
<ComboBox Name="FromYear" Width="200" OutputProperty="${FromYear}" Required="True" LabelCode="FROMYEAR" Items="${FromYears}" />
<ComboBox Name="ToYear" Width="200" OutputProperty="${ToYear}" Required="True" LabelCode="TOYEAR" Items="${ToYears}" />
<CheckBox Name="CopyDeviations" Value="${CopyDeviations}" OutputProperty="${CopyDeviations}" LabelCode="COPYDEVIATIONS" />
<CheckBox Name="IncludeMutations" Value="${IncludeMutations}" OutputProperty="${IncludeMutations}" LabelCode="COPYMUTATIONS" />
</Container>
</Dialog>
<Validation Name="Check previous year" Condition="${ToYear} > ${FromYear}" MessageCode="2752" />
<Transaction>
<GetList Name="Get All BudgetPeriods" Type="BudgetPeriod" OutputProperty="${BudgetPeriods}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="SplitForCostType" Operator="=" PropertyValue="False" />
<PropertyFilter PropertyName="Year" Operator="=" PropertyValue="${FromYear}" />
<InFilter PropertyName="Context" Values="BudgetPeriodContext.CostTypeYear, BudgetPeriodContext.Year" />
<NotFilter>
<InFilter PropertyName="CostCenter.Id">
<Subquery Type="BudgetPeriod">
<Filters>
<PropertyFilter PropertyName="Year" Operator="=" PropertyValue="${ToYear}" />
<PropertyFilter PropertyName="Context" Operator="=" PropertyValue="BudgetPeriodContext.Year" />
</Filters>
<Properties>
<Property Name="CostCenter.Id" Alias="ccrId" Type="Property" />
</Properties>
</Subquery>
</InFilter>
</NotFilter>
</Filters>
</GetList>
<ForEach Name="Loop BudgetPeriods" In="${BudgetPeriods}" As="BudgetPeriod">
<WorkflowCall Name="BudgetPeriod_CopyPeriod" WorkflowName="BudgetPeriod_CopyPeriod">
<Parameter Name="BudgetPeriod" Direction="In" Value="${BudgetPeriod}" />
<Parameter Name="CopyDeviations" Direction="In" Value="${CopyDeviations}" />
<Parameter Name="IncludeMutations" Direction="In" Value="${IncludeMutations}" />
<Parameter Name="Year" Direction="In" Value="${ToYear}" />
</WorkflowCall>
</ForEach>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>