# 513 - Document validations

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

513 - Document validations

| Event                                                | Extension action set  | Description                                                                                                                                     |
| ---------------------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| [Before ](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/sales/513-sales-document-validations.md#before)  | EXT\_0513\_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/sales/513-sales-document-validations.md#replace) | EXT\_0513\_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/sales/513-sales-document-validations.md#after)     | EXT\_0513\_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;
