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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

OData GET by Key Fails for Custom Data Entity in D365FO While It Works for Standard Entity

(2) ShareShare
ReportReport
Posted on by 77

Hi everyone,

I'm facing an issue with a custom data entity in D365 Finance & Operations when using OData through Postman. The standard entities work as expected using the key-based syntax, but the same approach fails for a custom entity.

Standard Entity (Works)

  • Endpoint to get all records:
    {{envFinOpUrl}}/data/EmployeesV2

  • Endpoint to get a specific record using keys:{{envFinOpUrl}}/data/EmployeesV2(PersonnelNumber='000001',EmploymentId='000000001',EmploymentLegalEntityId='100')

This returns the expected filtered record.

Custom Entity (Fails)

  • Endpoint to get all records (works fine):
    {{envFinOpUrl}}/data/DTSOpResOperationsResourceWorkCalendarAssignmentEntity

  • Endpoint to get a specific record using keys (throws error){{envFinOpUrl}}/data/DTSOpResOperationsResourceWorkCalendarAssignmentEntity(OperationsResourceId='A001',ValidFrom='2005-05-04T12:00:00Z',ValidTo='2154-12-31T12:00:00Z')
    Error Received:

{
"Message": "No HTTP resource was found that matches the request URI '.../DTSOpResOperationsResourceWorkCalendarAssignmentEntity(...)'. No route data was found for this request."
}


My Question:
What could be causing this issue in the custom entity? Is there a specific requirement or configuration in the data entity to support key-based access like in standard entities?Please note:
I am not looking for a $filter workaround — I want this to work using the (key1='val1',key2='val2') syntax.
I already verified that the entity fields exist and are mapped properly.
There is no IsPrimaryKey property at the field level, so I’m unsure how to define key behavior like standard entities.
 

Would appreciate an exact and working solution or guidance to make this work for the custom entity.

Thanks in advance!

Categories:
I have the same question (0)
  • Jonas "Jones" Melgaard Profile Picture
    5,016 Most Valuable Professional on at
    Hi,
    I have moved your question from the General forum to the Finance forum, to avoid confusing the users working with Dataverse related questions.
    Hope you don't mind.
     
     
    It looks odd indeed.... I do wonder if it's related to the date/time syntax? I know there are some undocumented hickups in regards to the oData interface.
     
    I'll have a look at it later today if no-one has responded to your question.
     
     
  • Suggested answer
    Martin Dráb Profile Picture
    239,684 Most Valuable Professional on at
    I think the quotation marks around the date/time values shouldn't be there. 
  • AV-17040500-0 Profile Picture
    77 on at
    Thank you for your response Martin.

    I don’t believe the issue is related to the quotation marks around the date/time values, as I’ve used the same syntax with a standard entity and it works correctly for filtering records, as mentioned in the description. The problem only occurs with the custom data entity.
  • André Arnaud de Calavon Profile Picture
    305,643 Super User 2026 Season 1 on at
    Hi,
     
    I will provide my two cents here. Try to give some hints.
     
    Is the custom data entity having tables which are stored per legal entity? If so, it the default company of the user having the value in which legal entity you have the work calendar assignment?
    What fields did you add to the entity key for this data entity?
  • Martin Dráb Profile Picture
    239,684 Most Valuable Professional on at
    There is no date/time field in your query of the standard entity, there it says nothing about whether date/time values can be enclosed in quotation marks. Using quotation marks for strings (as in your example) is correct, but that's not the topic.
  • AV-17040500-0 Profile Picture
    77 on at

    Hello Andre,
    Thanks for your response.

    Yes, the Primary company context property of the custom data entity is set to DataAreaId, and I’ve verified that the legal entity of the current user (i.e., myself) matches the legal entity of the work calendar assignment record.

    Interestingly, I’m able to retrieve all records using:
    {{envFinOpUrl}}/data/DTSOpResOperationsResourceWorkCalendarAssignmentEntity

    But when I try to filter or use GET by key to retrieve a specific record, it fails, which is puzzling.

    I’m still looking into whether any field mapping or key setup might be affecting the behavior.

     

    Thanks again for your suggestions.

  • AV-17040500-0 Profile Picture
    77 on at
    Hello Martin,

    I also tried using the date value without quotation marks, but it still didn’t work — I'm encountering the same error regardless.

    Thanks !!
  • Martin Dráb Profile Picture
    239,684 Most Valuable Professional on at
    Aren't you missing DataAreaId? I guess that's most likely the problem.
     
    If not, can you open /data/DTSOpResOperationsResourceWorkCalendarAssignmentEntity, find the record you're interesteed in (resource ID A001 etc.) and show the data to us? 
  • AV-17040500-0 Profile Picture
    77 on at
    Here is the record :
     
        "value": [
            {
                "@odata.etag": "W/\"JzEsNTYzNzE0NjA3Nic=\"",
                "OperationsResourceId": "A001",
                "ValidFrom": "2005-05-04T12:00:00Z",
                "ValidTo": "2154-12-31T12:00:00Z",
                "WorkCalendarId": "Production"
            },
  • Martin Dráb Profile Picture
    239,684 Most Valuable Professional on at
    You haven't responded to the topic of DataAreaId. Could you do it, please?
     
    I see that F&O contains an entity called OpResOperationsResourceWorkCalendarAssignmentEntity. The name of your entity suggests that you're doing something similar; you've probably duplicated the standard entity. Can you please tell us whether it works for you? Maybe we can completely remove your custom entity from the question if the problem can be demonstrated on the standard one.  
     
    Note that the entity is company specific, therefore the entity key implicitly contains DataAreaId and you must include it when you request a record by the entity key. 

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 668 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

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

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 581

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans