web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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,352 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard