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

PurchLine entity returns empty data

(1) ShareShare
ReportReport
Posted on by 471
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:
I have the same question (0)
  • Suggested answer
    Jonas "Jones" Melgaard Profile Picture
    5,016 Most Valuable Professional on at
    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
  • EK-26061005-0 Profile Picture
    471 on at
    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?
  • Jonas "Jones" Melgaard Profile Picture
    5,016 Most Valuable Professional on at
    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.
  • Suggested answer
    Layan Jwei Profile Picture
    8,212 Super User 2026 Season 1 on at
    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
  • Jonas "Jones" Melgaard Profile Picture
    5,016 Most Valuable Professional on at
    @Layan It should still return rows, in my example I called it without the DataAreaId range. That's the odd part...
  • Layan Jwei Profile Picture
    8,212 Super User 2026 Season 1 on at
    Hi Jonas,
     
    Yes you are right, cross company alone should return data from all legal entities ( I think i misread the previous reply)
     
    I didn't try to call this entity but it should work.
     
    EK, can you please go to SQL and do a select statement for the entity there, just to make sure u really have data, does the select return data?
  • EK-26061005-0 Profile Picture
    471 on at
    Hello Layan,
     
    Like you said the SQL query result also returns with zero rows for PURCHLINEENTITY.
  • Layan Jwei Profile Picture
    8,212 Super User 2026 Season 1 on at
    Hi EK,
     
    This means that you don't have purch data in your devBox.
     
    Please go and create a purchase order with lines then try again
  • EK-26061005-0 Profile Picture
    471 on at
    @Layan I forgot to mention that the PURCHLINE returns data in SQL when selected. It's PURCHLINEENTITY that returns zero data in SQL.
  • Layan Jwei Profile Picture
    8,212 Super User 2026 Season 1 on at
    Hi EK,

    What's the entity name exactly as there no entity named purchlinentity? maybe there is a range on it that returns data with specific condition OR maybe there is an extension to it with customizations OR there is a join with another table that is causing data to not be returned

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
André Arnaud de Calavon Profile Picture

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 635 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 547

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans