hongji.li
2023-11-11 df5a7e1ad6835e78b2f9eb7428817b0c23b116bc
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
Quintiq file version 2.0
#parent: GUITimerSetMPDefaultViewForFirstLogin
Response OnTimer () id:Response_ApplicationLibMacroPlanner_GUITimerSetMPDefaultViewForFirstLogin_OnTimer
{
  #keys: '[132448.0.224571183]'
  Body:
  [*
    // Workaround open empty view to set default dialog/form layouts
    if( [Boolean]ValueHolderSetMPDefaultViewForFirstLogin.Value() )
    {
      // Calling open view in OnCreate will not work because the Value in Value holder is yet to recovered from setting
      dlg := Application.Frame().FindChildObject( typeof( SWF_DialogEditUser ).Name() ).astype( SWF_DialogEditUser );
      
      // Do no proceed if the Workflow model dialog is open, calling open view with model dialog open will result in an error
      if( isnull( dlg ) )
      {
        ApplicationScope.ViewManager().OpenView( 'Empty (dialog initialization)' );
        this.Enabled( false );
        ValueHolderSetMPDefaultViewForFirstLogin.Value( false.AsQUILL() );
      }
    }
    else
    {
      this.Enabled( false );
    }
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_GUITimer_OnTimer'
}