1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod CanCreate ( 
 |    output String feedback_o, 
 |    Entitys entities 
 |  ) declarative remote as Boolean 
 |  { 
 |    Description: '(Web) Drag and drop precondition to check all selected entities are Stocking points' 
 |    TextBody: 
 |    [* 
 |      // Verify all are SPs (e.g drag and drop entities onto Account_MP, return false if any entity are Units) 
 |      canCreate := not exists( entities, Elements.astype( Unit ), e, true ); 
 |       
 |      if( not canCreate ) 
 |      { 
 |        feedback_o := Translations::MP_WebDesigner_StockingPointDrop(); 
 |      } 
 |       
 |      return canCreate; 
 |    *] 
 |  } 
 |  
  |