Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1113
ActionField1113
Beschrijving: Copy properties to current Space (new RRE) based on another Space (existing RRE). Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| Space | Space | Root |
| CopyComponents | Boolean | Optional |
| CopyCostMutations | Boolean | Optional |
| CopyDocuments | Boolean | Optional |
| CopyFeatures | Boolean | Optional |
| CopyNotes | Boolean | Optional |
| CopyProperties | Boolean | Optional |
XMLbewerken
<Workflow Name="ActionField1113" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Copy properties to current Space (new RRE) based on another Space (existing RRE).</Description>
<Properties>
<Property Name="Space" Type="Space" Accessor="Root" Direction="In" />
<Property Name="CopyComponents" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Copy RentableRealEstateContractLine (with costs)" />
<Property Name="CopyCostMutations" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Copy RentableRealEstateContractLineCostMutation only when CopyComponents is true" />
<Property Name="CopyDocuments" Type="Boolean" Accessor="Optional" Direction="In" Default="False" Comment="Copy Documents" />
<Property Name="CopyFeatures" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Copy Features" />
<Property Name="CopyNotes" Type="Boolean" Accessor="Optional" Direction="In" Default="False" Comment="Copy Notes" />
<Property Name="CopyProperties" Type="Boolean" Accessor="Optional" Direction="In" Default="True" Comment="Copy Vendor/SpaceType/InvoiceGroup/Site" />
<Property Name="InitialCostMutation" Type="RentableRealEstateContractLineCostMutation" Accessor="Internal" />
<Property Name="SourceComponents" Type="List[RentableRealEstateContractLine]" Accessor="Internal" />
<Property Name="SourceCostMutations" Type="List[RentableRealEstateContractLineCostMutation]" Accessor="Internal" />
<Property Name="SourceDocuments" Type="List[ObjectDocument]" Accessor="Internal" />
<Property Name="SourceFeatures" Type="List[ObjectFeature]" Accessor="Internal" />
<Property Name="SourceNotes" Type="List[Notes]" Accessor="Internal" />
<Property Name="TargetComponent" Type="RentableRealEstateContractLine" Accessor="Internal" />
<Property Name="TargetCostMutation" Type="RentableRealEstateContractLineCostMutation" Accessor="Internal" />
<Property Name="TargetDocument" Type="ObjectDocument" Accessor="Internal" />
<Property Name="TargetFeature" Type="ObjectFeature" Accessor="Internal" />
<Property Name="TargetNote" Type="Notes" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Validation Name="ValidateSourceSelected" Condition="${Space.CopyFromSpace} != Empty" MessageCode="2224" />
<Dialog Name="CopyRentableRealEstateFromRentableRealEstate" TitleCode="COPYRREFROMRRE">
<Container TitleCode="SELECTPARTSTOCOPY" Border="True">
<CheckBox Name="CheckBoxProperties" Value="${CopyProperties}" OutputProperty="${CopyProperties}" LabelCode="PROPERTIES" />
<CheckBox Name="CheckBoxComponents" Value="${CopyComponents}" OutputProperty="${CopyComponents}" LabelCode="RRECOMPONENTS" />
<CheckBox Name="CheckBoxCostMutations" Value="${CopyCostMutations}" OutputProperty="${CopyCostMutations}" ReadOnly="=${CopyComponents} == False" LabelCode="COSTMUTATIONS" />
<CheckBox Name="CheckBoxFeatures" Value="${CopyFeatures}" OutputProperty="${CopyFeatures}" LabelCode="FEATURES" />
<CheckBox Name="CheckBoxNotes" Value="${CopyNotes}" OutputProperty="${CopyNotes}" LabelCode="NOTES" />
<CheckBox Name="CheckBoxDocuments" Value="${CopyDocuments}" OutputProperty="${CopyDocuments}" LabelCode="DOCUMENTS" />
</Container>
</Dialog>
<Transaction>
<When Name="CopyProperties selected" Condition="${CopyProperties} == True">
<Assign Name="Copy Vendor" Property="${Space.Vendor}" Value="${Space.CopyFromSpace.Vendor}" />
<Assign Name="Copy SpaceType" Property="${Space.SpaceType}" Value="${Space.CopyFromSpace.SpaceType}" />
<Assign Name="Copy InvoiceGroup" Property="${Space.InvoiceGroup}" Value="${Space.CopyFromSpace.InvoiceGroup}" />
<Assign Name="Copy Site" Property="${Space.Site}" Value="${Space.CopyFromSpace.Site}" />
</When>
<When Name="CopyComponents selected" Condition="${CopyComponents} == True">
<GetList Name="Get components of source" Type="RentableRealEstateContractLine" OutputProperty="${SourceComponents}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Space" Operator="=" PropertyValue="${Space.CopyFromSpace}" />
</Filters>
</GetList>
<ForEach Name="Copy each component" In="${SourceComponents}" As="SourceComponent">
<Insert Name="Create component for current RRE" ObjectType="RentableRealEstateContractLine" OutputProperty="${TargetComponent}">
<Parameter Name="ChargeFrequency" Direction="In" Value="${SourceComponent.ChargeFrequency}" />
<Parameter Name="ChargeMoment" Direction="In" Value="${SourceComponent.ChargeMoment}" />
<Parameter Name="ContractLineType" Direction="In" Value="${SourceComponent.ContractLineType}" />
<Parameter Name="CostCenter" Direction="In" Value="${SourceComponent.CostCenter}" />
<Parameter Name="CostType" Direction="In" Value="${SourceComponent.CostType}" />
<Parameter Name="Description" Direction="In" Value="${SourceComponent.Description}" />
<Parameter Name="EndDate" Direction="In" Value="${SourceComponent.EndDate}" />
<Parameter Name="Frequency" Direction="In" Value="${SourceComponent.Frequency}" />
<Parameter Name="Indexable" Direction="In" Value="${SourceComponent.Indexable}" />
<Parameter Name="InvoiceOnce" Direction="In" Value="${SourceComponent.InvoiceOnce}" />
<Parameter Name="Price" Direction="In" Value="${SourceComponent.Price}" />
<Parameter Name="PricePerDay" Direction="In" Value="${SourceComponent.PricePerDay}" />
<Parameter Name="Space" Direction="In" Value="${Space}" />
<Parameter Name="StartDate" Direction="In" Value="${SourceComponent.StartDate}" />
<Parameter Name="Vat" Direction="In" Value="${SourceComponent.Vat}" />
</Insert>
<GetItem Name="Get initial cost mutation" Type="RentableRealEstateContractLineCostMutation" OutputProperty="${InitialCostMutation}">
<Filters>
<PropertyFilter PropertyName="RentableRealEstateContractLine" Operator="=" PropertyValue="${SourceComponent}" />
<PropertyFilter PropertyName="Status" Operator="=" PropertyValue="RentableRealEstateContractLineCostMutationStatus.Approved" />
<PropertyEmptyFilter PropertyName="StartDate" Comment="the initial cost mutation does not have a date" />
</Filters>
</GetItem>
<Insert Name="Create initial cost mutation for current component" ObjectType="RentableRealEstateContractLineCostMutation" OutputProperty="${TargetCostMutation}">
<Parameter Name="Status" Direction="In" Value="RentableRealEstateContractLineCostMutationStatus.Concept" />
<Parameter Name="Description" Direction="In" Value="${InitialCostMutation.Description}" />
<Parameter Name="Employee" Direction="In" Value="${InitialCostMutation.Employee}" />
<Parameter Name="EndDate" Direction="In" Value="${InitialCostMutation.EndDate}" />
<Parameter Name="Mutation" Direction="In" Value="${InitialCostMutation.Mutation}" />
<Parameter Name="Percentage" Direction="In" Value="${InitialCostMutation.Percentage}" />
<Parameter Name="Price" Direction="In" Value="${InitialCostMutation.Price}" />
<Parameter Name="PricePerDay" Direction="In" Value="${InitialCostMutation.PricePerDay}" />
<Parameter Name="Reason" Direction="In" Value="${InitialCostMutation.Reason}" />
<Parameter Name="RentableRealEstateContractLine" Direction="In" Value="${TargetComponent}" />
<Parameter Name="StartDate" Direction="In" Value="${InitialCostMutation.StartDate}" />
<Parameter Name="Vat" Direction="In" Value="${InitialCostMutation.Vat}" />
<Parameter Name="VatPercentage" Direction="In" Value="${InitialCostMutation.VatPercentage}" />
<Parameter Name="VatPrice" Direction="In" Value="${InitialCostMutation.VatPrice}" />
</Insert>
<ChangeStatus Name="Change status to Approve (to trigger RRETaxAdm record creation" DomainObject="${TargetCostMutation}" NewStatus="RentableRealEstateContractLineCostMutationStatus.Approved" />
<Comment><![CDATA[
Since the cost mutations are linked to the components, there is no reason to copy them if the components are not copied as well.
In the dialog, the checkbox for CopyCostMutations is made readonly when the checkbox for CopyComponents is unchecked. However,
because it is not possible to dynamically updated the checkbox for CopyCostMutations, that could still be selected in that case.
This is not a problem, because the When-block below is within the one for components.
]]></Comment>
<When Name="CopyCostMutations selected" Condition="${CopyCostMutations} == True">
<GetList Name="Get approved cost mutations of component" Type="RentableRealEstateContractLineCostMutation" OutputProperty="${SourceCostMutations}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="RentableRealEstateContractLine" Operator="=" PropertyValue="${SourceComponent}" />
<PropertyFilter PropertyName="Status" Operator="=" PropertyValue="RentableRealEstateContractLineCostMutationStatus.Approved" />
<NotFilter>
<PropertyEmptyFilter PropertyName="StartDate" Comment="the initial cost mutation does not have a date" />
</NotFilter>
</Filters>
</GetList>
<ForEach Name="Copy each cost mutations" In="${SourceCostMutations}" As="SourceCostMutation">
<Insert Name="Create cost mutation for current component" ObjectType="RentableRealEstateContractLineCostMutation" OutputProperty="${TargetCostMutation}">
<Parameter Name="Status" Direction="In" Value="RentableRealEstateContractLineCostMutationStatus.Concept" />
<Parameter Name="Description" Direction="In" Value="${SourceCostMutation.Description}" />
<Parameter Name="Employee" Direction="In" Value="${SourceCostMutation.Employee}" />
<Parameter Name="EndDate" Direction="In" Value="${SourceCostMutation.EndDate}" />
<Parameter Name="Mutation" Direction="In" Value="${SourceCostMutation.Mutation}" />
<Parameter Name="Percentage" Direction="In" Value="${SourceCostMutation.Percentage}" />
<Parameter Name="PreviousPrice" Direction="In" Value="${SourceCostMutation.PreviousPrice}" />
<Parameter Name="PreviousVatPercentage" Direction="In" Value="${SourceCostMutation.PreviousVatPercentage}" />
<Parameter Name="PreviousVatPrice" Direction="In" Value="${SourceCostMutation.PreviousVatPrice}" />
<Parameter Name="Price" Direction="In" Value="${SourceCostMutation.Price}" />
<Parameter Name="PricePerDay" Direction="In" Value="${SourceCostMutation.PricePerDay}" />
<Parameter Name="Reason" Direction="In" Value="${SourceCostMutation.Reason}" />
<Parameter Name="RentableRealEstateContractLine" Direction="In" Value="${TargetComponent}" />
<Parameter Name="StartDate" Direction="In" Value="${SourceCostMutation.StartDate}" />
<Parameter Name="Vat" Direction="In" Value="${SourceCostMutation.Vat}" />
<Parameter Name="VatPercentage" Direction="In" Value="${SourceCostMutation.VatPercentage}" />
<Parameter Name="VatPrice" Direction="In" Value="${SourceCostMutation.VatPrice}" />
</Insert>
<ChangeStatus Name="Change status to Approve (to trigger RRETaxAdm record creation" DomainObject="${TargetCostMutation}" NewStatus="RentableRealEstateContractLineCostMutationStatus.Approved" />
</ForEach>
</When>
</ForEach>
</When>
<When Name="CopyFeatures selected" Condition="${CopyFeatures} == True">
<GetList Name="Get features of source" Type="ObjectFeature" OutputProperty="${SourceFeatures}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Space" Operator="=" PropertyValue="${Space.CopyFromSpace}" />
</Filters>
</GetList>
<ForEach Name="Copy each feature" In="${SourceFeatures}" As="SourceFeature">
<Insert Name="Create feature for current RRE" ObjectType="ObjectFeature" OutputProperty="${TargetFeature}">
<Parameter Name="AlphanumericValue" Direction="In" Value="${SourceFeature.AlphanumericValue}" />
<Parameter Name="DateTimeValue" Direction="In" Value="${SourceFeature.DateTimeValue}" />
<Parameter Name="Feature" Direction="In" Value="${SourceFeature.Feature}" />
<Parameter Name="FeatureChoice" Direction="In" Value="${SourceFeature.FeatureChoice}" />
<Parameter Name="NumericValue" Direction="In" Value="${SourceFeature.NumericValue}" />
<Parameter Name="PhysicalQuantityUnit" Direction="In" Value="${SourceFeature.PhysicalQuantityUnit}" />
<Parameter Name="SortSequence" Direction="In" Value="${SourceFeature.SortSequence}" />
<Parameter Name="SortSequenceDeprecated" Direction="In" Value="${SourceFeature.SortSequenceDeprecated}" />
<Parameter Name="Space" Direction="In" Value="${Space}" />
<Parameter Name="TemporaryUnit" Direction="In" Value="${SourceFeature.TemporaryUnit}" />
<Parameter Name="YesNoValue" Direction="In" Value="${SourceFeature.YesNoValue}" />
</Insert>
</ForEach>
</When>
<When Name="CopyNotes selected" Condition="${CopyNotes} == True">
<GetList Name="Get notes of source" Type="Notes" OutputProperty="${SourceNotes}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="SpaceNotes" Operator="=" PropertyValue="${Space.CopyFromSpace}" />
</Filters>
</GetList>
<ForEach Name="Copy each note" In="${SourceNotes}" As="SourceNote">
<Insert Name="Create note for current RRE" ObjectType="Notes" OutputProperty="${TargetNote}">
<Parameter Name="Date" Direction="In" Value="${SourceNote.Date}" />
<Parameter Name="Description" Direction="In" Value="${SourceNote.Description}" />
<Parameter Name="Employee" Direction="In" Value="${SourceNote.Employee}" />
<Parameter Name="NotesSubject" Direction="In" Value="${SourceNote.NotesSubject}" />
<Parameter Name="SpaceNotes" Direction="In" Value="${Space}" />
<Parameter Name="Text" Direction="In" Value="${SourceNote.Text}" />
</Insert>
</ForEach>
</When>
<When Name="CopyDocuments selected" Condition="${CopyDocuments} == True">
<GetList Name="Get documents of source" Type="ObjectDocument" OutputProperty="${SourceDocuments}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Space" Operator="=" PropertyValue="${Space.CopyFromSpace}" />
</Filters>
</GetList>
<ForEach Name="Copy each note" In="${SourceDocuments}" As="SourceDocument">
<Insert Name="Create note for current RRE" ObjectType="ObjectDocument" OutputProperty="${TargetDocument}">
<Parameter Name="CreateDate" Direction="In" Value="${SourceDocument.CreateDate}" />
<Parameter Name="CreateEmployee" Direction="In" Value="${SourceDocument.CreateEmployee}" />
<Parameter Name="Document" Direction="In" Value="${SourceDocument.Document}" />
<Parameter Name="Space" Direction="In" Value="${Space}" />
<Parameter Name="Text" Direction="In" Value="${SourceDocument.Text}" />
</Insert>
</ForEach>
</When>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>