Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1281
ActionField1281
Beschrijving: Assign Customer of Job to all records (InvoiceLines, JobExternals,JobMaterials, etc.) linked to Job. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| Job | Job | Root |
XMLbewerken
<Workflow Name="ActionField1281" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Assign Customer of Job to all records (InvoiceLines, JobExternals,JobMaterials, etc.) linked to Job.</Description>
<Properties>
<Property Name="Job" Type="Job" Accessor="Root" Direction="In" />
<Property Name="InvoiceLines" Type="List[InvoiceLine]" Accessor="Internal" />
<Property Name="JobExternals" Type="List[JobExternal]" Accessor="Internal" />
<Property Name="JobMaterials" Type="List[JobMaterial]" Accessor="Internal" />
<Property Name="JobResources" Type="List[JobResource]" Accessor="Internal" />
<Property Name="JobTools" Type="List[JobTool]" Accessor="Internal" />
<Property Name="JobWeekLabours" Type="List[JobWeekLabour]" Accessor="Internal" />
<Property Name="PurchaseRequestLines" Type="List[PurchaseRequestLine]" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Comment><![CDATA[ change customer for all detail fields ]]></Comment>
<Comment><![CDATA[ if there are any invoiced details, let the user decide whether to continue or not ]]></Comment>
<WorkflowCall Name="Check invoiced details" WorkflowName="Job_CheckInvoicedDetails">
<Parameter Name="Job" Direction="In" Value="${Job}" />
</WorkflowCall>
<Transaction>
<GetList Name="get all job materials" Type="JobMaterial" OutputProperty="${JobMaterials}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.Job" Operator="=" PropertyValue="${Job.Id}" />
<NotFilter>
<InFilter PropertyName="Status" Values="JobMaterialStatus.Invoiced, JobMaterialStatus.InvoiceNextRun, JobMaterialStatus.InvoiceProposal, JobMaterialStatus.InvoiceZero" />
</NotFilter>
</Filters>
</GetList>
<ForEach Name="JobMaterial" In="${JobMaterials}" As="JobMaterial">
<Assign Name="set new customer for material" Property="${JobMaterial.Customer}" Value="${Job.Customer}" />
<Command Name="JobMaterial_SetInternalChargeValues" CommandName="JobMaterial_SetInternalChargeValues">
<Parameter Name="JobMaterial" Direction="In" Value="${JobMaterial}" />
<Parameter Name="RecalculateInvoiceCostOnPrecalculation" Direction="In" Value="True" />
<Parameter Name="RecalculateRaise" Direction="In" Value="True" Comment="if the customer is changed, recalculation of raise is required" />
</Command>
</ForEach>
<GetList Name="get all job externals" Type="JobExternal" OutputProperty="${JobExternals}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.Job" Operator="=" PropertyValue="${Job.Id}" />
<NotFilter>
<InFilter PropertyName="Status" Values="JobExternalStatus.Invoiced, JobExternalStatus.InvoiceNextRun, JobExternalStatus.InvoiceProposal, JobExternalStatus.InvoiceZero" />
</NotFilter>
</Filters>
</GetList>
<ForEach Name="JobExternal" In="${JobExternals}" As="JobExternal">
<Assign Name="set new customer for external" Property="${JobExternal.Customer}" Value="${Job.Customer}" />
<Command Name="JobExternal_SetInternalChargeValues" CommandName="JobExternal_SetInternalChargeValues">
<Parameter Name="JobExternal" Direction="In" Value="${JobExternal}" />
<Parameter Name="RecalculateInvoiceCostOnPrecalculation" Direction="In" Value="True" />
</Command>
</ForEach>
<GetList Name="get all job tools" Type="JobTool" OutputProperty="${JobTools}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.Job" Operator="=" PropertyValue="${Job.Id}" />
<NotFilter>
<InFilter PropertyName="Status" Values="JobToolStatus.Invoiced, JobToolStatus.InvoiceNextRun, JobToolStatus.InvoiceProposal, JobToolStatus.InvoiceZero" />
</NotFilter>
</Filters>
</GetList>
<ForEach Name="JobTool" In="${JobTools}" As="JobTool">
<Assign Name="set new customer for tool" Property="${JobTool.Customer}" Value="${Job.Customer}" />
<Command Name="JobTool_SetInternalChargeValues" CommandName="JobTool_SetInternalChargeValues">
<Parameter Name="JobTool" Direction="In" Value="${JobTool}" />
<Parameter Name="RecalculateInvoiceCostOnPrecalculation" Direction="In" Value="True" />
</Command>
</ForEach>
<GetList Name="get list of jobres to reset invoice cost and quantity" Type="JobResource" OutputProperty="${JobResources}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.Job" Operator="=" PropertyValue="${Job}" />
<NotFilter>
<InFilter PropertyName="Status" Values="JobResourceStatus.Invoiced, JobResourceStatus.InvoiceNextRun, JobResourceStatus.InvoiceProposal, JobResourceStatus.InvoiceZero" />
</NotFilter>
</Filters>
</GetList>
<ForEach Name="reset them all" In="${JobResources}" As="JobResource">
<Assign Name="set new customer for resource" Property="${JobResource.Customer}" Value="${Job.Customer}" />
<Command Name="JobResource_SetInternalChargeValues" CommandName="JobResource_SetInternalChargeValues">
<Parameter Name="JobResource" Direction="In" Value="${JobResource}" />
</Command>
</ForEach>
<GetList Name="get list of jobweeklab to reset invoice cost and quantity" Type="JobWeekLabour" OutputProperty="${JobWeekLabours}" OrderBy="Id" OrderDirection="Ascending">
<Joins>
<Join Name="Id.JobWeek" Alias="jobWeek" Type="InnerJoin" />
</Joins>
<Filters>
<PropertyFilter PropertyName="jobWeek.Id.Job" Operator="=" PropertyValue="${Job}" />
<NotFilter>
<InFilter PropertyName="Status" Values="JobWeekLabourStatus.Invoiced, JobWeekLabourStatus.InvoiceNextRun, JobWeekLabourStatus.InvoiceProposal, JobWeekLabourStatus.InvoiceZero" />
</NotFilter>
</Filters>
</GetList>
<ForEach Name="reset them all" In="${JobWeekLabours}" As="JobWeekLabour">
<Assign Name="set new customer for JobWeekLabour" Property="${JobWeekLabour.Customer}" Value="${Job.Customer}" />
<Command Name="JobWeekLabour_SetInternalChargeValues" CommandName="JobWeekLabour_SetInternalChargeValues">
<Parameter Name="JobWeekLabour" Direction="In" Value="${JobWeekLabour}" />
</Command>
</ForEach>
<GetList Name="get list of PurchaseRequestLine to reset invoice cost and quantity" Type="PurchaseRequestLine" OutputProperty="${PurchaseRequestLines}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Job" Operator="=" PropertyValue="${Job}" />
<NotFilter>
<InFilter PropertyName="Status" Values="PurchaseRequestLineStatus.Invoiced, PurchaseRequestLineStatus.InvoiceNextRun, PurchaseRequestLineStatus.InvoiceProposal, PurchaseRequestLineStatus.InvoiceZero" />
</NotFilter>
</Filters>
</GetList>
<ForEach Name="reset them all" In="${PurchaseRequestLines}" As="PurchaseRequestLine">
<Assign Name="set new customer for PurchaseRequestLine" Property="${PurchaseRequestLine.Customer}" Value="${Job.Customer}" />
<Command Name="PurchaseRequestLine_SetInternalChargeValues" CommandName="PurchaseRequestLine_SetInternalChargeValues">
<Parameter Name="PurchaseRequestLine" Direction="In" Value="${PurchaseRequestLine}" />
</Command>
</ForEach>
<GetList Name="get list of InvoiceLines to reset invoice cost and quantity" Type="InvoiceLine" OutputProperty="${InvoiceLines}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Job" Operator="=" PropertyValue="${Job}" />
<NotFilter>
<InFilter PropertyName="Status" Values="InvoiceLineStatus.Invoiced, InvoiceLineStatus.InvoiceNextRun, InvoiceLineStatus.InvoiceProposal, InvoiceLineStatus.InvoiceZero" />
</NotFilter>
</Filters>
</GetList>
<ForEach Name="reset them all" In="${InvoiceLines}" As="InvoiceLine">
<Assign Name="set new customer for InvoiceLine" Property="${InvoiceLine.Customer}" Value="${Job.Customer}" />
<Command Name="InvoiceLine_SetInternalChargeValues" CommandName="InvoiceLine_SetInternalChargeValues">
<Parameter Name="InvoiceLine" Direction="In" Value="${InvoiceLine}" />
</Command>
</ForEach>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>