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

Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

(0) ShareShare
ReportReport
Posted on by 11,310

I have created a custom entity in D365 F&O, I am able to successfully export the entity data, but upon import i get the following error

Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

I cannot seem to find anyone experiencing the same issue, debugging to the point of when the update is called on the entity is very similar to another custom entity that works. Both have a record at the time of calling update in DMFEntityBase.insertUpdate() _target.update();

Could anyone guide me as to what i may be doing wrong?

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

    Moved to D365 Finance forum.

    Most likely you have some issue with your entity key. Did you create this entity with the entity wizard?

    Please check that your entity key fields correspond to an unique index in your table.

  • Jonathan  Halland Profile Picture
    11,310 on at

    Hi Nokolaos

    Thank you for moving the post. The entity key does correspond to a unique index. At the debug point mentioned the "_target" buffer even has a recId and is populated as is the case with a working entity.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    And how did you create this entity?

  • Jonathan  Halland Profile Picture
    11,310 on at

    It was create as a copy from an existing standard entity with an additional Datasource added on an outer join. The additional datasource was added to a similar entity as well in the same fashion and it works there, so i dont think that that is the problem.

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

    You can try to remove this data source and see if it has an impact.

    But perhaps the issue is in the x++ code of this entity. Quite often I see people having issues after copying standard entities, and they were caused by still having parts of the entity x++ code using the standard entity or standard staging table instead of your new entity / staging table.

  • Jonathan  Halland Profile Picture
    11,310 on at

    Hi Nikolaos.

    Thanks for your assistance, but I've reviewed all the code, there is nothing referring to the old entity, i did have it working at one point, somewhere along the line it stopped working. I'm busy stripping everything out that I have done to see what could be the step that broke it, but The error seems very strange / unrelated to anything i've done

  • Suggested answer
    Jonathan  Halland Profile Picture
    11,310 on at

    Hi Nikolaos.

    I'm embarassed to admit on the forum, but after scouring code i found that i mistakenly missing the super call in my postLoad method. After removing and debugging for hours that is what it came down to.

    Anyway, incuding the fix for anyone else ends up doing the same silly thing and can't figure out what went wrong!

    Thanks for your help.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    You're definetely not the first or the last to spend hours with something that turns out to be a simple mistake :)

    Thanks for sharing the explanation for your problem! This way we can learn also from each other's mistakes.

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 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 291 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans