# 413 - Document validations

> MSS documentation · https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/orders/413-orders-document-validations
>
> Eventos EXT_0413 nas validações da encomenda ao carregar em Finalizar documento; o Replace pode cancelar o processo com outCanSave.

413 - Document validations

| Event                                                 | Extension action set  | Description                                                                                                                                     |
| ----------------------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| [Before ](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/orders/413-orders-document-validations.md#before)  | EXT\_0413\_1\_Before  | Will be executed before MSS starts the validations of the document after pressing Finalize document;                                            |
| [Replace](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/orders/413-orders-document-validations.md#replace) | EXT\_0413\_2\_Replace | Will be executed before MSS starts the validations of the document after pressing Finalize document with the possibility to cancel the process; |
| [After](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/orders/413-orders-document-validations.md#after)     | EXT\_0413\_3\_After   |  Will be executed after all the document validations;                                                                                           |

### Before

_Input Parameters_

* inDocumentExercise – Exercise of the document;
* inDocumentType – Type of the document;
* inDocumentSeries – Series of the document;
* inDocumentNumber – Number of the document;
* inCustomerCode – Code of the selected customer;

### Replace

_Input Parameters_

* inDocumentExercise – Exercise of the document;
* inDocumentType – Type of the document;
* inDocumentSeries – Series of the document;
* inDocumentNumber – Number of the document;
* inCustomerCode – Code of the selected customer;

_Output Parameters_

* outCanSave – Return code: 1 – Continue the process / 0 – Cancel;

### After

_Input Parameters_

* inDocumentExercise – Exercise of the document;
* inDocumentType – Type of the document;
* inDocumentSeries – Series of the document;
* inDocumentNumber – Number of the document;
* inCustomerCode – Code of the selected customer;
