| Quintiq file version 2.0 | 
| #parent: #root | 
| Method LeftDomain (LibDEF_IntegrationEvent event_i) | 
| { | 
|   Description: 'For successfully leaving a Domain.' | 
|   TextBody: | 
|   [* | 
|     // Jacky CHAN Apr-26-2016 (created) | 
|     // clear Domain-GUID | 
|     domainGuid := LibDEF_Util::GetSettingValueDomainGUID(); | 
|     this.DomainGUID( domainGuid ); | 
|      | 
|     // delete external metadata | 
|     traverse( this.GetOtherPeers( true ), Elements, system ) | 
|     { | 
|       system.Delete(); | 
|     } | 
|      | 
|     // mark as left | 
|     this.SetInDomain( false ); | 
|      | 
|     LibDEF_Util::EventLog( event_i, "This System has successfully left a Domain."); | 
|   *] | 
| } |