Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Custom data entity not calling validateWrite()

(1) ShareShare
ReportReport
Posted on by 357
Hello:
I created a custom data entity based on a custom table. In testing, I found a number of issues. First, the table has a validateWrite() which works when I create records from the custom form attached to that table, but validateWrite() is not called using a DM job using that entity. I've tried adding validateWrite() and validateField() to the entity without success. Secondly, when I use the public collection name in the url (i.e., https://.../data/[public collection name]), no records are returned. I'll add that I created the entity by duplicating and modifying an existing entity. 
  • Layan Jwei Profile Picture
    Layan Jwei 7,679 Super User 2025 Season 1 on at
    Custom data entity not calling validateWrite()
    Hi Community member,

    I'm glad your issue is fixed. Please don't forget to verify the answers that helped.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,162 Super User 2025 Season 1 on at
    Custom data entity not calling validateWrite()
    Hi,

    You mentioned you duplicated the entity from another one. Have you also tried creating a new data entity using the wizard in Visual Studio?
  • Layan Jwei Profile Picture
    Layan Jwei 7,679 Super User 2025 Season 1 on at
    Custom data entity not calling validateWrite()
    Yes it could be that sth went wrong while copying it because validate write should be called. Update us please with your findings.
     
    And did calling the url work now after adding cross-company?
     
    When your issue is fixed, then please don't forget to verify the answers that helped.
  • Layan Jwei Profile Picture
    Layan Jwei 7,679 Super User 2025 Season 1 on at
    Custom data entity not calling validateWrite()
    Hi Community member,
     
    If u import using the original entity, does the validateWrite of the table gets called when you import?
     
    Regarding records not being returned, if you want to return records from a legal entity that is not equal to the user default legal entity, then you need to use cross-company=true 
     
    http://[baseURI\]/data/FleetCustomers?$filter=dataAreaId eq 'usrt'&cross-company=true

    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
     
  • Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 14,202 Super User 2025 Season 1 on at
    Custom data entity not calling validateWrite()
    Hi,
     
    You must launch build with synchro and then refresh entity list through the DM parameters.
    Best regards,
    Mohamed Amine MAHMOUDI

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans