# Пример вызова в скрипте через Imports и Namespace.action

<p class="callout success">Доступно с версии 2024.2</p>

### Вариант с использованием Imports:

```typescript
async function action(): Promise<void> {
    const message = `${Context.data.__item!.namespace}.${Context.data.__item!.code}.${Context.data.__item!.id}`;
    const details = JSON.stringify((<any>Context).json(), null, 2);
    Imports?.devtools?.action?.save_to_log?.call({message: message, details: details});
}
```

Нужно подключить зависимость и определить псевдоним, в данном примере это **devtools**:

[![image.png](https://kb.randmgroup.ru/uploads/images/gallery/2024-02/scaled-1680-/5iqtcCDwweto1iTd-image.png)](https://kb.randmgroup.ru/uploads/images/gallery/2024-02/5iqtcCDwweto1iTd-image.png)