1Ci Support Help Center home page
Submit a request
Sign in
  1. 1Ci Support
  2. 1C:Enterprise Development Standards
  3. Code conventions
  4. Using 1C:Enterprise language structures

Defining variable value type

  • Using 1C:Enterprise language structures
    • General requirements to creating 1C:Enterprise language structures
    • Moving expressions
    • Using duplicate code
    • Using compilation directives and preprocessor commands
    • Defining variable value type
    • Getting objects metadata
    • Form module event handlers attached in code
    • Using global variables in modules
    • Local variables pre-initializing
    • Using event log
See more

Scope: managed applications, mobile applications, and ordinary applications.

To test the value type of a variable, compare it with the expected type. Don't use other methods to test types.
Correct:

If TypeOf(Ref) = Type("DocumentRef.GoodsServicesReceipt") Then

Incorrect:

If Ref.Metadata().Name = "GoodsServicesReceipt" Then

© 2020-2022 1C INTERNATIONAL LLC www.1Ci.com Support policy