Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method SetBookmarkElement ( 
 | 
  Entitys checkedEntities, 
 | 
  Product_MPs checkedProducts, 
 | 
  SalesSegment_MPs checkedSalesSegments, 
 | 
  const structured_Object periodObject 
 | 
) 
 | 
{ 
 | 
  Description: 
 | 
  [* 
 | 
    Web introduced new bookmark logic. Keep bookmark as short as possible. 
 | 
    If all children (and descendants) checked, store the parent only. If partial, then no choice we store the checked children. 
 | 
  *] 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Save bookmark with parent only when the children are all checked 
 | 
    entities := Bookmark::GetEntitiesToSave( checkedEntities ); 
 | 
     
 | 
    units := selectset( entities, Elements.astype( Unit ), e, true ); // Cast to units 
 | 
    stocking_points := selectset( entities, Elements.astype( StockingPoint_MP ), e, true ); // Cast to SPs 
 | 
    products := Bookmark::GetProductsToSave( checkedProducts ); 
 | 
    sales_segments := Bookmark::GetSalesSegmentToSave( checkedSalesSegments ); 
 | 
     
 | 
    this.SetBookmarkElement( units, stocking_points, products, sales_segments, periodObject ); 
 | 
  *] 
 | 
} 
 |