Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

DimensionSetLines on API call for salesCreditMemos

Posted on by 769
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
Categories:
  • Jeppe Bylov Profile Picture
    Jeppe Bylov 32 on at
    DimensionSetLines on API call for salesCreditMemos
    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.
  • KJ-03062255-0 Profile Picture
    KJ-03062255-0 769 on at
    DimensionSetLines on API call for salesCreditMemos
    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
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,565 Super User 2024 Season 2 on at
    DimensionSetLines on API call for salesCreditMemos
    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans