Desktop version

Main > Knowledge Base > Best practices > Code conventions > Using 1C:Enterprise script clauses > PredefinedValue function usage specifics > Best practices > Code conventions > Using 1C:Enterprise script clauses > PredefinedValue function usage specifics > Best practices > Code conventions > Using 1C:Enterprise script clauses > PredefinedValue function usage specifics

PredefinedValue function usage specifics

This article describes the standards that apply to PredefinedValue function usage. All of the listed recommendations are mandatory unless noted otherwise.

The PredefinedValue global context function is intended for getting references to predefined items of catalogs, charts of characteristic types, or charts of calculation types, enumeration values, or business process route points by their string names.

Example:

BusinessIndividual = PredefinedValue("Enum.BusinessIndividual.Business");

The main purpose of this function is getting predefined values in the script that is executed in the thin client or web client (where objects like CatalogManager.<Catalog name> and EnumManager<Enumeration name> are not available).

Incorrect:

If String(BusinessIndividual) = "Business" Then

Correct:

If BusinessIndividual = PredefinedValue("Enum.BusinessIndividual.Business") Then
Next page: Using compilation directives


See also:




© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.