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 :
Small and medium business | Business Central, N...
Suggested Answer

DimensionSetLines on API call for salesCreditMemos

(1) ShareShare
ReportReport
Posted on by 10
I have an API call that brings back the salesCreditMemos just fine, but if I try and expand it, I get a message that the parent ID is invalid. If I change the code to pull the salesInvoices, it runs just fine. Has anyone seen this issue before, or know what is different about the salesCreditMemos and if you can use the dimensionSetLines call with it?
 
Works just fine:
https:/api.businesscentral.dynamics.com/v2.0/d4c6fc04-732f-4225-8730-f686adab6818/Production/api/v2.0/companies(9e9da054-1026-ed11-97e8-000d3a1d8a66)/salesInvoices?$filter=customerNumber eq '24337'&$expand=dimensionSetLines
 
Fails:
https:/api.businesscentral.dynamics.com/v2.0/d4c6fc04-732f-4225-8730-f686adab6818/Production/api/v2.0/companies(9e9da054-1026-ed11-97e8-000d3a1d8a66)/salesInvoices?$filter=customerNumber eq '24337'&$expand=dimensionSetLines
 
result:
    /error/: {
        /code/: /Application_DialogException/,
        /message/: /Parent with ID {8E5B5DA0-4914-ED11-90EB-000D3A10835A} does not exist.  CorrelationId:  b8a83f08-50f5-4d3b-b221-7fcb1e653061./
    }
The 8E5B5DA0-4914-ED11-90EB-000D3A10835A is the system id of the 1st credit memo pulled if I run the salesCreditMemo with the customerNUmber paramter, but not the expand.
 
Thanks,
Kevin
I have the same question (1)
  • Suggested answer
    YUN ZHU Profile Picture
    98,014 Super User 2026 Season 1 on at
    Hi, I simply tested it and didn't encounter your problem.
    My test endpoint: https://api.businesscentral.dynamics.com/v2.0/c8558e71-6ad8-4fcd-9f29-3ca165b41bbe/Sandbox240P/api/v2.0/companies(57747d95-78d5-ee11-904e-6045bdac9fd4)/salesCreditMemos?$filter=customerNumber eq '20000' &$expand=dimensionSetLines
    On the page:
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • KJ-03062255-0 Profile Picture
    10 on at
    Thanks Yun, unfortunately there still seems to be an issue with my data as I tried matching your syntax and it still comes back with the "Parent with ID ....." regardless of what customer I try and filter to. I went ahead and even tried changing out dimensionSetLines with customer just to try a different expand and it works fine. Below are the screenshots that show the credit memo with customer, and then the error when changed to dimensionSetLines. Is there any chance the issue is that when I get the error, the "Parent ID" is in upper case, but the ID shows in lowercase? Any ideas where to look/troubleshoot? Is it possible to recreate this through a custom API?
     
    dimensionSetLines
     
     
  • Jeppe Bylov Profile Picture
    32 on at
    I'm experiencing the same issue.
    I've done some testing and there's nothing that will allow any kind of records to go through, with $expand=dimensionSetLines on.
     
    Kevin, did you manage to find a solution?
     
    This customer has been through cloud migration from OnPrem to cloud. I'm wondering if that has anything to do with it. Yet, that doesn't provide any solutions.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,091 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,032 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 946 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans