Execute Code#
Run the 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 processes" 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 executing the code. 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 is the variable used to extract the value after executing the code, and its name must not change |
| Error Handling Level | Select the error handling level. Possible values:
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:
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 |