19. Februar 2014 17:29
  Rec.SETCURRENTKEY("Power Range", "Document No.", "Line No.");
  PowerRange := '';
  REPEAT
    IF PowerRange <> Rec."Power Range" THEN BEGIN
      PowerRange := Rec."Power Range";
      SalesShipmentLineLoc.RESET;
      CurrForm.SETSELECTIONFILTER(SalesShipmentLineLoc);
      SalesShipmentLineLoc.SETRANGE("Power Range", PowerRange);
      SalesGetShpt.SetSalesHeader(SalesHeader);
      SalesGetShpt.CreateInvLines(SalesShipmentLineLoc);
      CLEAR(SalesHeader);
      [...]
      SalesHeader.INSERT(TRUE);
    END;
  UNTIL Rec.NEXT = 0;
20. Februar 2014 12:01
If either all or no records are selected, marks will not be used.
If one or more records are selected on the form, then SetSelectionFilter does the following:
- Copies the current key from the form source table to the destination record
- Copies the current sort order from the table to the destination record
- Copies the current filters that are set in all filter groups
- Copies the current filter group
- Marks the selected records and sets the "marked only" filter
If no record is selected on the form, then SetSelectionFilter does the following:
- Sets the current filter group to 0 on the destination record
- Adds filters on the primary key fields that point to the current record of the form
20. Februar 2014 13:35
        PowerRange := Rec."Power Range";
        Rec.SETRANGE("Power Range", PowerRange);
        SalesGetShpt.SetSalesHeader(SalesHeader);
        SalesGetShpt.CreateInvLines(Rec);
        Rec.SETRANGE("Power Range");20. Februar 2014 14:37
PowerRange := Rec."Power Range";
SETRANGE("Power Range", PowerRange);
SalesShipmentLineLoc.RESET;
CurrForm.SETSELECTIONFILTER(SalesShipmentLineLoc);
SalesGetShpt.SetSalesHeader(SalesHeader);
SalesGetShpt.CreateInvLines(SalesShipmentLineLoc);
SETRANGE("Power Range");20. Februar 2014 14:55
24. Februar 2014 10:40
24. Februar 2014 17:19
