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,306

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?

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

    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.

  • Suggested answer
    Jonathan  Halland Profile Picture
    Jonathan Halland 11,306 on at
    RE: Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

    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.

  • Jonathan  Halland Profile Picture
    Jonathan Halland 11,306 on at
    RE: Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

    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
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

    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
    Jonathan Halland 11,306 on at
    RE: Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

    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.

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

    And how did you create this entity?

  • Jonathan  Halland Profile Picture
    Jonathan Halland 11,306 on at
    RE: Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

    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.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Custom Entity - Results. Cannot edit a record in [Entity label] ([EntityAOTName]). The record has never been selected.

    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.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans