Order.GetAvailableFields

Syntax:

GetAvailableFields()

Returned value:

Type: CustomFields.

Description:

Obtains field collection available for sorting.
Caution: This method is not available for dynamic list filtering (property Order of the objects CatalogList., DocumentList., etc.).

Availability:

Server, thick client, external connection.

Example:

// Procedure makes copies of available fields and items from one 
// "Order" object to another
//
// Parameters:
//  What - Order, which items and available fields need to be copied
//  To - Order, which items and available fields need to be created
Procedure CopyFilter(What, To) Export
    CopyTo.SetAvailableFields(What.GetAvailableFields());
    For 
each Item In What Do
        NewOrder = To.Find(Item.Name);
        If 
NewOrder = Undefined Then
            NewOrder = To.Add(Item.Name, Item.Name, 
                            Item.Presentation);
        EndIf
; 
        NewOrder.ComparisonType  = Item.ComparisonType;
        NewOrder.Value      = Item.Value;
        NewOrder.ValueFrom     = Item.ValueFrom;
        NewOrder.ValueTo    = Item.ValueTo;
        NewOrder.Use = Item.Use;
    EndDo
; 
EndProcedure


    

1C:Enterprise Developer's Community