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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to use data entity to update existing records in a table ?

(0) ShareShare
ReportReport
Posted on by 18

Hi all

This development is for D365 F&O, I am using visual studio 2019 for the coding/development.

I have added a few customized fields in CustTable using extensions.

My requirement is to create a new data entity that will update the existing records. The user wants to import using excel, which will have customer account and the data for the custom fields.

Can someone please help me with this?

What I want to know is which methods do I need to override to complete my requirements also please do guide me to any standard entity with these methods.

Thank you all for your help in advance.

I have the same question (0)
  • Verified answer
    GirishS Profile Picture
    27,843 Moderator on at

    Hi AnandKrishna,

    If you have added new field to CustTable. You can extend the standard entity which is using this table and add your custom fields there. No need to create a new entity.

    Refer to the below link.

    https://d365ffo.com/2021/05/06/d365ffo-ax-add-new-field-to-a-data-entity/

    If you want to populate values to custom fields, you can make use of insertEntityDataSource methods. Refer to the below url for data entity method call sequence.

    https://axatoz.wordpress.com/2019/03/10/d365-data-entity-sequence/

    Thanks,

    Girish S.

  • AnandKrishna Profile Picture
    18 on at

    Thank you for the reply, Girish.

    I am aware I can extend the existing entity, but the customer has specified that they need a new entity for the newly added fields.

    Hence the post.

    The newly added entity is to just to update the existing customers and should not create anything new.

  • Verified answer
    Deepak Agarwal Profile Picture
    8,923 on at

    Hello,

    I agree with Girish, you don't need a new entity even if you want to update few fields. Pl understand the concept of data entity and how it works. Entity should have primary key to identify if its a new record or modification. For your requirement you can still use std entity with your changes and in excel template you can just keep those fields which you want along with mandatory fields.

    You can start exploring by removing few fields from std and try to import.

  • AnandKrishna Profile Picture
    18 on at

    I duplicated the entity (CustCustomerV3) kept the required fields along with my customized fields, now when I try to import to update existing record I get the error "Cannot create a record in Customers (CustTable).

    The record already exists."

    The requirement specifically states that they need a separate data entity so adding my custom fields to standard entity is not an option.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    304,991 Super User 2026 Season 1 on at

    Hi Anand,

    When a customer specifies requirement, then it is up to the partner/solution architect to correct them when they are against the best practices. There is no requirement to create a new data entity to be able to import the new fields. The existing one can be extended like mentioned above.

    Of course, you can create a new data entity, but you can easily make a mistake and end up with errors like you have now. We don't know the exact contents of the entity you have now, so we don't know what might cause the issue now.

    My suggestion is to extend the current entity with the new fields. You can then map the Excel columns with the target fields and start an import project. Please help the customer by informing them how the standard can be extended. A customer can tell you the business requirement, but you have to help them with the best technical implementation.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 661 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 620

#3
Subra Profile Picture

Subra 473

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans