web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Copy into legal entity not working - how to debug?

(0) ShareShare
ReportReport
Posted on by

Hi,

I am having a problem with Copy into legal entity function.

I want to copy some setup data from one legal entity to another and I am getting message that copying was successful but when I go to the form, there is no data.

How to debug this method to see why it doesn't get copied?

Thanks

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Perhaps the data was copied, but some additional data is needed to make your data visible on the form.

    You can use table browser to see if the data was copied. Then compare the source company and target company data in table browser and try to spot a difference.

    Also, try to create similar data manually (via the form) in the target company, and compare it to the data that was copied using Copy into legal entity function.

  • Community Member Profile Picture
    on at

    There is no data in the table, I used the table browser. Also, when I create manually using the same data from one company, creation is successful.

    Also, when I export from one company and import that data into another, it is successful. So, only when I try to do that easier way (using Copy into data entity) for some reason it does not get copied.

  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Devgirlax,

    Can you tell which table(s) you used and the procedure? Did you make sure that at least one target company was selected?

  • Community Member Profile Picture
    on at

    Hi,

    The tables that I am using are not standard, they are part of a vertical solution and it is a setup table:

    pastedimage1574348932183v1.png

    I am simpy going to Data management, create Copy into legal entity, select source and target company, upload entity and click on copy. Yes, I am sure that at least one target company is selected and I don't have problems with other data entities copying between those two companies, I only have a problem with this. 

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Perhaps you can talk to the provider of the vertical solution?

    In my opinion, if export/import works, also "copy to legal entity" should work. But I'm sure there's some explanation why it doesn't work for you in this case.

  • Community Member Profile Picture
    on at

    My firm is a provider, we are developing that.

    I would like to know how can I debug this function Copy into legal entity to see why it doesn't insert data even though it is telling me that it Is successful?

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Ah, ok, I see :)

    Debugging it is pretty similar to any other debugging. First you need to find out where to put your breakpoint, and then start debugging. You can start from the clicked method of CopyCompany button in DMFQuickImportExportEnhanced form.

    It calls menu item DMFCompanyWriterAsync.

    Since it's async, you might need to attach to the batch service instead of w3wp/iisexpress.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    Put debugger in method copyCompanyData  class DMFCompanyWriter  and see whats going on. All these DMF classes are mostly has similar naming convention, for example for entity import  the name of class is DMFEntityWriter,  for copying companies its DMFCompanyWriter . So just serch by DMF in application exploerer and by just looking at classes , you should be easily able to identify what class is used for what purpose.

  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Devaxgirl,

    Like Nikolaos mentioned above, did you check if a separate export to file and import from that file in another company works?

  • Community Member Profile Picture
    on at

    Yes, it works, so that is why this is strange to me. Maybe it is due to some setup. But I will but breakpoints in methods that Sukrut ans Nikolaos told me and try to see what is going on.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans