> For the complete documentation index, see [llms.txt](https://doc.sysdevmobile.com/syslog-extensibility/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.sysdevmobile.com/syslog-extensibility/functions-syslog-kalipso/inventory/501-inventory-save-document.md).

# 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;
