Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

PurchLine entity returns empty data

Posted on by 62
I was asked to provide read-only OData capabilities for PurchLine table so i created an entity for it via data entity wizard without using staging table. When i try to get the related data via onebox.dynamics.com/data/PurchLines url, it returns empty array as result.
Categories:
  • PurchLine entity returns empty data
    @Layan It should still return rows, in my example I called it without the DataAreaId range. That's the odd part...
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 7,204 Super User 2024 Season 2 on at
    PurchLine entity returns empty data
    Hi,

    Using cross-company=true alone won't be enough, you need to specify the dataAreaId as well

    For example:
    URL/data/PurchaseOrderLinesV2?cross-company=true&$filter=dataAreaId eq 'usmf'

    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
  • PurchLine entity returns empty data
    You got a point, and I didn't think of it. I would not design a solution based on obsolete components.
     
    I think it's strange that your entity is not returning data, if it's only PurchLine without any ranges. Can you share a screen shot of the entity parameters?
    However, if the PurchLineBiEntities entity return rows, I'd just copy it into the customization model.
  • EK-26061005-0 Profile Picture
    EK-26061005-0 62 on at
    PurchLine entity returns empty data
    Thanks for the fast response Jonas. Unfortunately adding the cross-company didn't help. I've also been wondering about the BiEntities since most of them are marked as obsolete by default. How does this effect it's usage? Can a powerapp dev use it as usual?
  • Suggested answer
    PurchLine entity returns empty data
    You don't need to create a new entity, as you can use PurchLineBiEntities.
     
     
    Regardless, try to add "?cross-company=true" to your URL, like this: onebox.dynamics.com/data/PurchLines?cross-company=true

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans