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
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method UpdateTypeIndex ( 
 |    String name 
 |  ) 
 |  { 
 |    Description: 'Update group TypeIndex and the linked instances.' 
 |    TextBody: 
 |    [* 
 |      // desmondt Mar-26-2015 (created) 
 |       
 |      if( this.Name() <> name ) 
 |      { 
 |        traverse( this, Unit, unit ) 
 |        { 
 |          unit.UpdateForeignKey( unit.CurrencyID(), 
 |                                 name, 
 |                                 unit.ParentUnitID(), 
 |                                 unit.UnitOfMeasureName() ); 
 |        } 
 |       
 |        traverse( this, StockingPoint_MP, sp ) 
 |        { 
 |          sp.UpdateForeignKey( sp.UnitOfMeasureName(), sp.CurrencyID(), name, sp.UnitID() ); 
 |        } 
 |         
 |        this.IsManuallyConfigured( true ); 
 |        Group::ChangeKeyGroupTypeIndex( this, name ); 
 |      } 
 |    *] 
 |  } 
 |  
  |