# 3802 – On Select Document Type

> MSS documentation · https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/general/3801-clear-document-lines-1
>
> Eventos EXT_3802 ao selecionar o tipo de documento; o Replace pode cancelar e indicar o cliente e o local de entrega a selecionar.

3802 – On Select Document Type

| Event                                             | Extension action set  | Description                                                                                             |
| ------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------- |
| [Before ](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/general/3801-clear-document-lines-1.md#before)  | EXT\_3802\_1\_Before  | Will be executed before MSS validates the selected document type                                        |
| [Replace](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/general/3801-clear-document-lines-1.md#replace) | EXT\_3802\_2\_Replace | Will be executed before MSS validates the selected document type with the possibility to cancel the process; |
| [After](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/general/3801-clear-document-lines-1.md#after)     | EXT\_3802\_3\_After   | Will be executed after MSS validates the selected document type                                         |

### Before

_Input Parameters_

* inDocumentModule – Code of the document module (P – Orders / A – Sales / F – Purchases / E – Suppliers orders)
* inDocumentType - Code of the selected document type
* inCustomerCode - Code of the customer, if selected  

### Replace

_Input Parameters_

* inDocumentModule – Code of the document module (P – Orders / A – Sales / F – Purchases / E – Suppliers orders)
* inDocumentType - Code of the selected document type
* inCustomerCode - Code of the customer, if selected

_Output Parameters_

* outCanSelect - Return code: 1 – Continue the process / 0 – Cancel;
* outCustomerToSelect - If configured, returns the customer code to be selected
* outDeliveryPLaceToSelect - If configured, returns the delivery place code to be selected

### After

_Input Parameters_

* inDocumentModule – Code of the document module (P – Orders / A – Sales / F – Purchases / E – Suppliers orders)
* inDocumentType - Code of the selected document type
* inCustomerCode - Code of the customer, if selected
