How to change the legal entity primary business address AX 2012?

Hi, we need to update the primary address associated to the legal entity but I couldn’t change the primary address, while I am able to create new address (Business) and I was hoping that I could either deactive the primary or change.

Could someone suggest how could we change the primary address of a legal entity in AX 2012?

any thoughts from experts? Do I need to update from SQL?

I can just bring up the address, press edit and alter it.

Hi Adam, that’s what I was hoping for but it seems that the primary address is gayed out mode. its bit odd that I couldn’t edit this address which was set as primary. Neither that I could create another one and set that to primary to legal entiry?

I am able to create a new address but not able to edit the existing one. The issue is with that particular address record

Any idea why AX can’t let me edit this address? Perhaps that I used rapidstart services to create this legal entity! and address and at that time, i didn’t import the city and state!

I can go to Organization Administration - Setup - Oraganization - Legal entities. I select the primary address, press edit and change it. What version/release are you on? If the edit button is greyed out check your security, and the GAB security setup.

Hi Adam, the edit button is not greyed out. However, when I click on edit, the screen comes up where I am not able to make any changes in “Edit address” screen. Interestingly, I can create a new address and modify that address and no problem there. But I can’t set the new address as “primary” because the old address has been set as primary.

From the Edit Address screen - I see location ID, name, Purpose, address, city, state etc., all of them are greyed out only for this primary address.

From the GAB Parameters, I didn’t tick on legal entity or team

I have both Sys admin and Security Admin permission. I have a worker created for me in the system.

I am baffled as to why AX doesn’t let me make the changes. I am on AX 2012 Feature Pack.

Maybe it is an issue in your FP.

This is what it looks like on CU3 as an example.

Thanks a lot Adam. The screen looks the same and may be I am on CU2 (Perhaps I can run CU4 and see) .

Just to clarify - Is the CU to be applied in server where the SQL database is installed? or is the CU applied on the AX Server? Appreciate your feedback.

This is the notes that I have from CU4:

on the point no#2, I assume that I need to run the CU application. Is that right? On point 4, how to does that work?

To update database schema, follow these steps:

  1. Make sure that the Management Utilities component is installed by using Dynamics AX 2012 or Dynamics AX 2012 Feature Pack 1 installation package.

  2. Apply the update to the Components item by using the Dynamics AX 2012 Cumulative Update 4 package.

    Important Note Do not apply database updates at this point.

  3. Run the following command:

    axutil.exe schema /db:target model database name

    Note Axutil.exe is installed with the Dynamics AX 2012 Management Utilities to the C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities folder. You can start it by running the Administrative Tools control panel item and then clicking Microsoft Dynamics AX 2012 Management shell.

  4. Apply Dynamics AX 2012 Cumulative Update 4 to the model database.

Hi Patrick,

We cannot change primary address with transaction posted. Therefore, if you need to change it, you can delete existing transaction by run class sysdatabaseTransDelete in the AOT. After doing this, you can active primary check or de-active it.

Hi Patrick,

We cannot change primay address in AX with transaction posted. You can run class SysDatabaseTransDelete to delete exsiting transactions and then change the primary checkbox.

Best regards,


Hi Adam,

I have one clarification… How to u change the purpose field through code… Is that possible?? Since that purpose is just a edt with no relatuion to any table field … I cant understand that structure how it varies … Plz help me

Thanks and Regards,


Hey [mention:713992e2cc394574827989c4d4af9bbb:e9ed411860ed4f2ba0265705b8793d05],

Here’s another oldie but goodie. This post get’s lots of views each month. Think you can answer Enrique’s last question? Maybe it’ll help out whomever is accessing this post!


Hi Jake

The quetion would be why you would want to change the purpose through code, but not being a developer I could not answer how to do this!


That is a good question, Steve! Just thought, since there’s lots of activity here, maybe we can figure out what people are looking for.

Anyone out there that’s accessing this thread, what are you interested in?!

@EnriqueKevin06: The EDT is displaying only a string with possible multiple roles per location. The table managing the location roles for party addresses is: DirPartyLocationRole.