# 501 - Save Document

501 - (Inventory) Save Document

| **Event**           | **Extension action set** | **Description**                                                                                                                    |
| ------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| [Before ](#before)  | EXT\_0501\_1\_Before     | Will be executed before save the document;                                                                                         |
| [Replace](#replace) | EXT\_0501\_2\_Replace    | Will be executed before Syslog APP saves the others documents with the possibility to say Syslog APP to cancel the saving process; |
| [After](#after)     | EXT\_0501\_3\_After      | Will be executed after the document is saved;                                                                                      |

### Before

*Input Parameters*

* inCabKey – Unique key of the document; (assisted inventory)&#x20;
* inInternalStamp - Internal key of the document (blind inventory);

*Output Parameters*

* outCanSave – Return code:&#x20;
  * 1 – Save the document&#x20;
  * 0 – Cancel

### Replace

*Input Parameters*

* inCabKey – Unique key of the document; (assisted inventory)&#x20;
* inInternalStamp - Internal key of the document (blind inventory);&#x20;
* inWarehouse – Warehouse&#x20;
* inZone – Zone
* inLocation - Location

*Output Parameters*

* outCanSave – Return code:&#x20;
  * 1 - Save the document&#x20;
  * 0 - Cancel out

### After

*Input Parameters*

* inCabKey – Unique key of the document; (assisted inventory);
* inInternalStamp - Internal key of the document (blind inventory);
* inFilterCabDoc - Unique key of the document;&#x20;
* inErroIntegracao - Return code:&#x20;
  * 0 - no Error
  * 1 - Error saving&#x20;
* inStampDocGerado - Generated document;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.sysdevmobile.com/syslog-extensibility/functions-syslog-kalipso/inventory/501-inventory-save-document.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
