1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-25 22:12:29 +02:00
Files
OpenIntegrations/docs/en/md/Addons/Melezh/Console-Interface/Argument-setting/Set-handler-argument.mdx
Vitaly the Alpaca (bot) 55b680dffe Main build (Jenkins)
2025-05-27 19:03:00 +03:00

78 lines
2.1 KiB
Plaintext
Vendored

---
sidebar_position: 1
description: Set handler argument and other functions to work with Melezh in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Set handler argument
Sets an argument to the handler function, allowing it to be unspecified when called
`Function SetHandlerArgument(Val Project, Val HandlersKey, Val Argument, Val Value, Val Strict = True) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Project | --proj | String | ✔ | Project filepath |
| HandlersKey | --handler | String | ✔ | Handlers key |
| Argument | --arg | String | ✔ | CLI argument (option) for the handler function |
| Value | --value | String | ✔ | String argument value |
| Strict | --strict | Boolean | ✖ | True > argument cannot be overwritten with data from the query |
Returns: Structure Of KeyAndValue - Setting result
<br/>
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
melezh SetHandlerArgument \
--proj "C:\Users\bayselonarrend\AppData\Local\Temp\anxujp4k.bmi" \
--handler "my-key" \
--arg "text" \
--value "Hello world!" \
--strict true
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
melezh SetHandlerArgument ^
--proj "C:\Users\bayselonarrend\AppData\Local\Temp\anxujp4k.bmi" ^
--handler "my-key" ^
--arg "text" ^
--value "Hello world!" ^
--strict true
```
</TabItem>
</Tabs>
```json title="Result"
{
"data": {
"active": 1,
"function": "CreatePost",
"key": "my-key",
"library": "vk",
"method": "FORM",
"args": [
{
"arg": "text",
"strict": 1,
"value": "Hello world!"
}
]
},
"result": true
}
```