# 511 - Add Article

> MSS documentation · https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/sales/511-sales-add-article
>
> Eventos EXT_0511 ao adicionar um artigo a uma venda: o Replace pode cancelar (outCanSelect) e o After pode recarregar as linhas.

511 - Add Article

| Event                                       | Extension action set  | Description                                                                                                               |
| ------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| [Before ](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/sales/511-sales-add-article.md#before)  | EXT\_0511\_1\_Before  | Will be executed before MSS opens quantity screen after selecting the article;                                            |
| [Replace](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/sales/511-sales-add-article.md#replace) | EXT\_0511\_2\_Replace | Will be executed before MSS opens quantity screen after selecting the article with the possibility to cancel the process; |
| [After](https://doc.sysdevmobile.com/mss/extensibility/functions-mss-to-kalipso/sales/511-sales-add-article.md#after)     | EXT\_0511\_3\_After   | Will be executed after adding a new line;                                                                                 |

### Before

_Input Parameters_

* inArticleCode - Code of the selected article;
* inDocumentType - Type of the document;
* inCustomerCode - Code of the selected customer;

### Replace

_Input Parameters_

* inArticleCode - Code of the selected article;
* inDocumentType - Type of the document;
* inCustomerCode - Code of the selected customer;

_Output Parameters_

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

### After

_Input Parameters_

* inArticleCode - Code of the selected article;
* inDocumentType - Type of the document;
* inCustomerCode - Code of the selected customer;
* inDocumentLine - Line number created;

_Output Parameters_

* outReloadDocument - Reload document lines, if equal to 1 MSS will reload all document lines to show any change made to the document.
