How can I determine which data needs to be filled in the 1C: Trade Management 11 (УТ11) form?
In the ‘Customer Order’ document form, there is an embedded table ‘Products’ with a ‘Price Type’ column. The price type is set as follows:
ReferenceBooks.PriceTypes.FindByName(“Retail”);
How can I determine that the ‘Price Type’ field in the form is specifically linked to the ‘ReferenceBooks.PriceTypes’ reference book?
Determining Required Data for Customer Order Forms and Verifying Price Type Connections in 1C: Trade Management 11
To determine the data required to be filled in the “Customer Order” document form and to verify the connection between the “Price Type” field and the “PriceTypes” reference book in 1C: Trade Management 11, it is necessary to use the built-in configuration and system development tools.
Contents
- How to Determine Form Filling Requirements in 1C UT11
- Structure of the “Customer Order” Document and the “Price Type” Field
- Verifying the Connection Between the “Price Type” Field and the “PriceTypes” Reference Book
- Programmatic Methods for Working with Price Types
- Practical Examples and Recommendations
How to Determine Form Filling Requirements in 1C UT11
To determine the data required to be filled in the 1C: Trade Management 11 document form, several methods should be used:
Built-in Hint System
- Contextual hints - when hovering over unfilled fields, hints about required data appear
- Mandatory fields - marked with a red asterisk (*) and must be filled to post the document
- Data validation - the system automatically checks the correctness of entered values
1C Development System
// Programmatic check of mandatory fields
If NOT Object.Counterparty Then
Message("Counterparty must be specified!");
Return;
EndIf;
Documentation and Methodological Materials
According to the official 1C documentation, the Trade Management 11 configuration has standard requirements for filling out documents depending on their type and business process.
Structure of the “Customer Order” Document and the “Price Type” Field
The “Customer Order” document in 1C UT11 has the following structure:
Main Document Attributes
- Counterparty - buyer of goods or services
- Contract - contract with the counterparty
- Warehouse - shipping warehouse
- Responsible - manager responsible for the order
- Date - order date
“Products” Table Section
The table section contains a list of ordered products with columns:
- Nomenclature - product name
- Quantity - ordered quantity
- Price - price per unit
- Price Type - type of price offer
- Amount - total amount of the line item
The “Price Type” field in the products table is key for correctly calculating the order value and selecting the appropriate price offer for a specific client.
Verifying the Connection Between the “Price Type” Field and the “PriceTypes” Reference Book
There are several ways to verify the connection between the “Price Type” field and the “PriceTypes” reference book:
1. Through the 1C Development System
// Checking the value type of the field
If TypeOf(Elements.PriceType.Value) = Type("CatalogRef.PriceTypes") Then
Message("The field is indeed connected to the PriceTypes reference book");
EndIf;
2. Through Form Settings
- Open the “Customer Order” document form in configurator mode
- Select the “Price Type” field in the “Products” table
- In the field properties, check the “Value Type” parameter - it should be specified as “CatalogRef.PriceTypes”
3. Through the Program Interface
// Getting information about the field
Metadata = Elements.PriceType.Metadata();
Message("Field type: " + Metadata.Type());
4. Through Built-in Analysis Tools
The article about price types in 1C UT11 states that price types are stored in the “PriceTypes” reference book and can be used in various documents, including customer orders.
Programmatic Methods for Working with Price Types
Setting Price Type Programmatically
// Searching for price type by name
PriceType = Catalogs.PriceTypes.FindByName("Retail");
If PriceType <> Undefined Then
NewRow.PriceType = PriceType;
EndIf;
Accessing Price Type Properties
// Getting price type properties
If ThisRow.PriceType <> Undefined Then
PriceCurrency = ThisRow.PriceType.Currency;
CalculationMethod = ThisRow.PriceType.CalculationMethod;
EndIf;
Checking Existence of Price Type
// Checking if price type exists in the reference book
Function CheckPriceType(Name) Export
Try
Return Catalogs.PriceTypes.FindByName(Name) <> Undefined;
Except
Return False;
EndTry;
EndFunction
As described in this source, the identifier for formulas is automatically filled based on the price type name, confirming the connection to the reference book.
Practical Examples and Recommendations
Example 1: Automatic Price Type Filling
Procedure OnWrite(Cancel, WriteMode)
For Each Row From Products Do
If Row.PriceType = Undefined Then
Row.PriceType = Catalogs.PriceTypes.FindByName("Retail");
EndIf;
EndDo;
EndProcedure
Example 2: Price Type Validation
Function CheckPriceType(Order)
Result = True;
For Each Row From Order.Products Do
If Row.PriceType = Undefined Then
Message("Price type not specified in line " + Row.LineNumber);
Result = False;
EndIf;
EndDo;
Return Result;
EndFunction
Recommendations for Working with Price Types:
-
Use standard price types - as indicated in this source, the configuration contains standard price types such as “Price List”
-
Consider the order context - the price type should correspond to the client type and contract terms
-
Check the existence of the price type - before setting a value, make sure the price type exists in the reference book
-
Use system enumerations - for price types, you can use enumerations for systematization
-
Document price types - keep track of all price types used and their calculation rules
As noted in this source on customer orders, proper price type configuration is an important part of effective management of customer orders in 1C: Trade Management.
Sources
- Official 1C Documentation - What’s New in Version 11.5.6
- How to set prices for goods in 1C UT 11.4
- Price Types in 1C 8.3 Trade Management 11.4 (Part 1)
- Adding and modifying price types in UT11, KA2, ERP2
- Customer orders in 1C UT 11 - purpose, how to apply
- Customer orders in 1C: Trade Management 11, effective order management
Conclusion
-
Determining form filling requirements is carried out through built-in hints, mandatory fields, and data validation in 1C: Trade Management 11.
-
The “Price Type” field in the customer order form is connected to the “PriceTypes” reference book - this is confirmed through the development system, form properties, and program interface.
-
Programmatic access to price type is implemented through the
Catalogs.PriceTypes.FindByName()method and direct access to price type attributes. -
It is recommended to use standard price types, check their existence before setting values, and consider the order context when selecting a price type.
-
For in-depth study of working with price types and customer orders, it is recommended to refer to specialized courses and documentation on 1C: Trade Management 11.