| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SetPersistantFilter ( | 
|   Boolean enable | 
| ) id:Method_ApplicationLibMacroPlanner_SetPersistantFilter | 
| { | 
|   #keys: '[127710.1.1965793843]' | 
|   Body: | 
|   [* | 
|     // Turn the persistant filter on (true) or off (false) | 
|      | 
|     //In here, add the forms that require persistant filtering to be turned off. | 
|     formsalesdemand :=  Application.Frame().FindChildObject( typeof( FormSalesDemands ).Name() ).astype( FormSalesDemands ); | 
|     if( not isnull( formsalesdemand ) ) | 
|     { | 
|       formsalesdemand.PersistentFilter( enable ); | 
|     } | 
|      | 
|     // Update inventory spec to be filtered only by products (owner) | 
|     forminventoryspec :=  Application.Frame().FindChildObject( typeof( FormInventorySpecifications ).Name() ).astype( FormInventorySpecifications ); | 
|     if( not isnull( forminventoryspec ) ) | 
|     { | 
|       forminventoryspec.PersistentFilter( enable ); | 
|     } | 
|      | 
|     // Update inventory supplies to be filtered only by products (owner) | 
|     forminventorysupply :=  Application.Frame().FindChildObject( typeof( FormInventorySupplies ).Name() ).astype( FormInventorySupplies ); | 
|     if( not isnull( forminventorysupply ) ) | 
|     { | 
|       forminventorysupply.PersistentFilter( enable ); | 
|     } | 
|      | 
|     formpispip :=  Application.Frame().FindChildObject( 'FormProductInStockingPointInPeriods' ).astype( FormProductInStockingPointInPeriods ); | 
|     if( not isnull( formpispip ) ) | 
|     { | 
|       formpispip.PersistantFilter( enable ); | 
|     } | 
|   *] | 
| } |