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 :
Power Platform Community / Forums / Power Apps / Retrieve Absolute Url ...
Power Apps
Unanswered

Retrieve Absolute Url from SharePoint Document doesn't work with Fetch XML

(0) ShareShare
ReportReport
Posted on by 10

I am trying to build a query that will retrieve the list of absolute URL of documents linked to products. I validated that there are documents, and can see them from Dynamics. I built a simple fetch XML like this one, and it doesn't return anything for the absolute URL, it's blank:

 

<fetch top="50">
<entity name="product">
<attribute name="anca_productdisplayname" />
<attribute name="anca_productname" />
<attribute name="productid" />
<filter>
<condition attribute="productid" operator="eq" value="00000000-0000-0000-0000-000000000000" />
</filter>
<link-entity name="sharepointdocument" from="regardingobjectid" to="productid" link-type="outer" alias="sp">
<attribute name="absoluteurl" />
<attribute name="filetype" />
</link-entity>
</entity>
</fetch>

 

I also noticed that expanding the 'sharepointdocument' entity works fine when querying the WebAPI directly to a record, but not when using a filter, which technically returns the same thing:

Works

 

/api/data/v9.0/products(00000000-0000-0000-0000-000000000000)?$select=productid&$expand=Product_SharepointDocument($select=sharepointdocumentid,fullname,absoluteurl,documentid,filetype),Product_SharepointDocument($top=1)

 

Doesn't work

 

/api/data/v9.0/products?$filter=productid eq 00000000-0000-0000-0000-000000000000&$select=productid&$expand=Product_SharepointDocument($select=sharepointdocumentid,fullname,absoluteurl,documentid,filetype),Product_SharepointDocument($top=1)

 

Is this a known limitation of the API, or am I doing something wrong with my queries?

 

I have the same question (0)
  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    Absolute URL is a field on the Document Location record, it is not auto populated.  The  Document Location will have the Folder and a Parent Lookup, meaning the data exists to construct the full URL - but it is not structured for easy  querying due to it being recursive back to the SharePoint site. 

     

    Also, I have seen both Absolute and Relative URL being used in the one implementation, part of it was out-of-the-box (the relative), and then someone had coded the creation of some Document Locations and used Absolute ones for these.

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

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard