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, ...
Suggested Answer

get modified records only from entity x++

(1) ShareShare
ReportReport
Posted on by 169
I need to create a new custom table like (X table ) and entity with data source of (X table ) then make this entity return only modified records on this table 
I found property (allow row version change tracking) but I can't find how to use it or how it will return the modified records only 
there is any solution ?
  • Martin Dráb Profile Picture
    240,827 Most Valuable Professional on at
    How do you define modified records? Records that were modified after creation? Records modified (created, deleted) since a particular time? Or somehow else?
  • Menna Allah Ahmed Profile Picture
    169 on at
    Yes , records that modified after creation 
  • Suggested answer
    Martin Dráb Profile Picture
    240,827 Most Valuable Professional on at
    You'll find this information in RecVersion field. If the value isn't 1, the record was updated after creation.
     
    In your data entity, you may want to hide this implementation detail by creating a boolean computed column (called Modified or so), and return true if RecId <> 1.
  • Menna Allah Ahmed Profile Picture
    169 on at
    when I set property of allow row change tracking in entity I got a lot of error like sync database and can't insert record in entity , I tried to sync also but it still doesn't work there is any video or example to create entity with enabled allow row change tracking ?
  • Martin Dráb Profile Picture
    240,827 Most Valuable Professional on at
    Your requirement doesn't require change tracking, therefore you're wasting time with a wrong problem.
  • Menna Allah Ahmed Profile Picture
    169 on at
    I have entity with many tables , I need to get only modified records from this entity what should I do to filter on this ?
  • Layan Jwei Profile Picture
    8,301 Super User 2026 Season 2 on at
    Hi Menna,
     
    I think Martin gave you an idea, which is to create a computed column that returns true if RecVersion !=1
    Then filter on that computed column.
     
    As you are asking again what to do, then does that mean it didn't work with you? If yes, then can you please show us what u did?
  • Menna Allah Ahmed Profile Picture
    169 on at
    Can I filter on recVersion without set allow row version change tracking to yes ?
    when I set it to yes I can't use it , it gives me alot of errors like (can create a record on entity)
    so there is a document to how use it ? or can I filter without this property ? 
    If I can filter without it how can I get recVersion of entity to add to fields ?
     
  • Suggested answer
    Layan Jwei Profile Picture
    8,301 Super User 2026 Season 2 on at
    Hi Menna,

    Yes, you should be able to do so.

    Simply, create a new string unmapped field and link it the method you will create in the entity.
    https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-entity-computed-columns-virtual-fields#example-create-a-computed-field

    The method will look like sth like this:
     
        public static server str modifiedRecords()
        {
            return SysComputedColumn::if(SysComputedColumn::equalExpression(SysComputedColumn::comparisonField(tableStr(CustCustomerV3Entity),identifierStr(CustTable),fieldStr(CustTable,RecVersion)),SysComputedColumn::comparisonLiteral("1")),SysComputedColumn::returnLiteral(1), SysComputedColumn::returnLiteral(0));
        }
    and now in the data entity project, you can filter this computed field to equal 1


    I think you could also for example, check if modified field != createdDateTime instead of recVersion-- this would also mean that records have been modified

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.
  • Layan Jwei Profile Picture
    8,301 Super User 2026 Season 2 on at
    Hi,
     
    Is your issue fixed? If yes, then please verify the answers that helped.
     
    Thanks,
    Layan Jweihan

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 495 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 432 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 366

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans