# 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="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FCzzAnoge0CLsE9O0O7GL%2FConfiguration.png?alt=media&#x26;token=9b1f7585-e14b-4524-85cb-d35f790495e3" 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="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FwYP4rrx2qzqpviGZaERV%2FAccount%20Code%20Formula.png?alt=media&#x26;token=a7e51c26-b368-4866-a3cb-c65ac6dd5aaa" 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="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2F8MkUaZkQ8gI4Dgy11ldY%2FNew%20Account%20with%20Code.png?alt=media&#x26;token=97a60052-b5e6-4363-8dfe-a592b4ea2d49" 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="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FQu1jLMvZF7ojSdSVb4LV%2FModify%20Account%20Code.png?alt=media&#x26;token=93bdf0ee-12a7-4d97-b19e-14f8dd0f5a8d" 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.
