Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1521
ActionField1521
Beschrijving: Create backoffice Custom: Nee
XMLbewerken
<Workflow Name="ActionField1521" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Create backoffice</Description>
<Properties>
<Property Name="BackOfficeCount" Type="Int64" Accessor="Internal" />
<Property Name="BackOffices" Type="List[BackOffice]" Accessor="Internal" />
<Property Name="CustomJobContext" Type="Context" Accessor="Internal" />
<Property Name="CustomJobContexts" Type="List[RecordContext]" Accessor="Internal" />
<Property Name="JobContexts" Type="List[Context]" Accessor="Internal" />
<Property Name="LicensedJobContexts" Type="List[Context]" Accessor="Internal" Comment="Licensed jobcontext (including custom)" />
<Property Name="NewBackOffice" Type="BackOffice" Accessor="Internal" />
<Property Name="RecordContext" Type="RecordContext" Accessor="Internal" />
<Property Name="RecordContexts" Type="List[RecordContext]" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<WorkflowCall Name="License_GetLicensedBackOfficesSqlWhereClause" WorkflowName="License_GetLicensedBackOfficesSqlWhereClause">
<Parameter Name="LicensedJobContexts" Direction="Out" OutputProperty="${LicensedJobContexts}" />
</WorkflowCall>
<GetList Name="Get custom Job RecordContexts" Type="RecordContext" OutputProperty="${CustomJobContexts}" OrderBy="Id.Context" OrderDirection="Ascending">
<Filters>
<CombinedFilter FilterOperator="And">
<PropertyFilter PropertyName="Id.TableName" Operator="=" PropertyValue="Job" />
<PropertyFilter PropertyName="Id.Context" Operator=">=" PropertyValue="16777216" />
</CombinedFilter>
</Filters>
</GetList>
<ForEach Name="Custom Job RecordContext" In="${CustomJobContexts}" As="JobContext">
<Assign Name="Add RecordContext to Context parameter" Property="${CustomJobContext}" Value="${JobContext.Id.Context}" />
<AddToList Name="Fill LicensedJobContexts" List="${LicensedJobContexts}" Item="${CustomJobContext}" />
</ForEach>
<GetList Name="GetContext from Backoffice" Type="BackOffice" OutputProperty="${BackOffices}" OrderBy="Id" OrderDirection="Ascending" />
<ForEach Name="LoopBackOffices " In="${BackOffices}" As="BackOffice">
<AddToList Name="Fill JobContexts" List="${JobContexts}" Item="${BackOffice.JobContext}" />
</ForEach>
<Command Name="GetContextDescriptions" CommandName="GetContextDescriptions">
<Parameter Name="AllowCustom" Direction="In" Value="True" />
<Parameter Name="AllowedValues" Direction="In" Value="${LicensedJobContexts}" />
<Parameter Name="NotAllowedValues" Direction="In" Value="${JobContexts}" />
<Parameter Name="TableName" Direction="In" Value="Job" />
<Parameter Name="RecordContexts" Direction="Out" OutputProperty="${RecordContexts}" />
</Command>
</Transaction>
<Dialog Name="CreateBackOffice" TitleCode="CREATEBACKOFFICE">
<Container Border="True">
<ComboBox Name="RecordContext" Width="300" OutputProperty="${RecordContext}" Required="True" LabelCode="CONTEXT" ItemDescription="${Item.Description}" Items="${RecordContexts}" />
</Container>
</Dialog>
<Transaction>
<GetCount Name="Count BackOffice for the same Context" Type="BackOffice" OutputProperty="${BackOfficeCount}">
<Filters>
<PropertyFilter PropertyName="JobContext" Operator="=" PropertyValue="${RecordContext.Id.Context}" />
</Filters>
</GetCount>
<Validation Name="More then one BackOffice with this context" Condition="${BackOfficeCount} == 0" MessageCode="2850" />
<Insert Name="Create backoffice" ObjectType="BackOffice" OutputProperty="${NewBackOffice}">
<Parameter Name="JobContext" Direction="In" Value="${RecordContext.Id.Context}" />
</Insert>
<AssignText Name="Set Description" Property="${NewBackOffice.Description}" Value="${RecordContext.Description}" />
</Transaction>
<UserContent Name="Post" />
<View Name="Open Screen" ViewName="DataEntryScreen">
<Parameter Name="DomainObject" Direction="In" Value="${NewBackOffice}" />
<Parameter Name="FocusEditableField" Direction="In" Value="=${NewBackOffice.Description} == Empty" />
</View>
</Execution>
</Workflow>