Execute Code#

Run code execution on the server or client. For this block to work, the user must have the "Protection against dangerous actions" option disabled, and the role "Interactive opening of external reports and processing" enabled. For working with directories, the connection type must be "Server".

Connection[Link] Connection object to 1C. The variable name in this property must match the variable name in the "Connection" property of the "Connect" block from the 1C group that was previously used to connect to 1C
Code[Text] A line of code in the 1C language that needs to be executed. For example: "Nomenclature = Catalogs.Nomenclature.CreateElement(); Nomenclature.Name = ""Test Nomenclature""; Nomenclature.Write();"
Result[Text] The result of code execution. To return values, a temporary storage must be used. You should use the following lines in the code: "SherpaReturn = PlaceInTemporaryStorage(SendingMessage, UniqueIdentifier);". UniqueIdentifier can be any generated value. SherpaReturn - this variable is used to extract the value after code execution and the name should not be changed
Error Handling Level

Select the error handling level. Possible values:

  • "Default" - by default;
  • "Ignore" - errors are ignored;
  • "Handle" - errors are handled.

If "Default" is selected, the value from the "Start" block of this diagram will be used

Message Level

Select the message level that the blocks will output during operation. Possible values:

  • "Default" - by default;
  • "Release" - output is disabled;
  • "Debug" - main information output;
  • "Detailed" - detailed information output.

If "Default" is selected, the value from the "Start" block of this diagram will be used

Error Text[Text] Returns detailed information about the error in case of incorrect execution of the block