> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/setup-accounts/setup-new-account/account-configuration/apply-account-code-formula-in-modify-mode-also.md).

# Apply Account Code formula in Modify Mode also

**YouTube:** [How to Use Account Code Formula While Editing an Existing Account?](https://www.youtube.com/watch?v=5YFU1Flg7f8)

## How to Use Account Code Formula While Editing an Existing Account?

In this tutorial, we’ll show you how to apply the account code formula in modify mode in Logic ERP. This allows the system to generate or update account codes automatically even when you edit an existing account, ensuring consistency and reducing manual effort.

***

### Access Account Setup

* Navigate to Setup\Setup Accounts and then select **"Setup New Account".**
* Press **F5** to open the **Configuration** window.
* Locate the and enable the option labeled as&#x20;

> “**Apply Account Code Formula in Modify Mode also”**.

<figure><img src="/files/zMzL4gJfHO4ChPDOGxuv" alt=""><figcaption></figcaption></figure>

* Save the configuration.

***

### Review the Formula

We have already defined an **account code formula** where the account code is generated by combining the **mobile number** with the **maximum account code**.

<figure><img src="/files/rAhV9an1z9e8jJM5oqsz" alt=""><figcaption></figcaption></figure>

***

### Implement the Formula in Action

* Create a **new account**.
  * The **account code field** is automatically updated using the mobile number and account code formula.

<figure><img src="/files/OV0SmvruGWRDZ6uOdvku" alt=""><figcaption></figcaption></figure>

* Save the account and then reopen it.
* Modify the **mobile number**.

As you’ll observe, when the mobile number is updated, the **account code is also refreshed automatically** with the new details.

<figure><img src="/files/fAuuQiaOzOKsSvLiW75p" alt=""><figcaption></figcaption></figure>

***

### Key Benefit

This feature ensures that your **account codes remain consistent and dynamic**, even when account details like the mobile number are modified later.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/setup-accounts/setup-new-account/account-configuration/apply-account-code-formula-in-modify-mode-also.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
