admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Quintiq file version 2.0
#parent: #root
Method Delegate () id:Method_SWF_DialogCreateEditActivity_Delegate
{
  #keys: '[136682.0.610434165]'
  Body:
  [*
    // Forward the activity
    current_date := SWF_WorkflowDataset.GlobalParameter().CurrentDate();
                                                                           
    close_origin_activity := DataHolderIsClose.Data();
    
    origin_activity := DataHolderOriginActivity.Data();
    selectedelement := this.GetSelectionAuthorizationElement();
    selected_authorization := SWF_AuthorizationBase::GetSelectedAuthorizationFromStringSelections( SWF_WorkflowDataset,
                                                                                                   DropDownStringListAssignedTo.Text(),
                                                                                                   selectedelement );
                                                                                                 
    //Auto set created time and created user name
    description := SWF_Translation::TRANSLATE_NewActivityCreatedBy( DateTime::Now(), SWF_WorkflowDataset.GetCurrentUser().Name() ) + String::NewLine() + EditFieldDescription.Text();    
    SWF_WorkflowDataset.Service().TR_ProcessDelegateActivity 
                              ( origin_activity
                              , close_origin_activity
                              , EditFieldTitle.Text()
                              , description
                              , origin_activity.IsDefaultOpen()
                              , true /* Trust user input due date */
                              , DateTimeSelectorDueDate.DateTime().Date()
                              , current_date
                              , SWF_WorkflowDataset.GetCurrentUserID()
                              , guard( selected_authorization.DisplayName(), '' )
                              , guard( DropDownListStep.Data().ID(), Key::ZeroKey() )
                              , SWF_WorkflowDataset.GetCurrentUserID()
                              , guard( origin_activity.ViewLink(), '' )
                              , guard( DropDownListView.Data().Id(), '' ) );
  *]
}