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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to find Path/Location of file stored in a table

(0) ShareShare
ReportReport
Posted on by 448

Hi all,

I've a personal table in Dynamics 365 sales, where I store my "opportunities" files.
I need to find the variable PATH of file that I upload on the table and save it on the same row of the file in a specific column.

Thanx for any suggestion.

I have the same question (0)
  • Verified answer
    CRMJetty Profile Picture
    3,512 on at
    RE: How to find Path/Location of file stored in a table

    Hi DiePic ,

    The CRM Domain is your CRM instance domain which you find from CRM URL and in URL end I have used entity Plural name with account record id in () to access that record related data. please see below example to get more idea.

    Example:
    Here I have attachment field (Datatype is File)in my account entity, now I have attached 1 document for org-2 account record. By hovering on file you will get document download link  which I have highlighted in below screenshot. also you can get link by right click on file name and copy the link.
    pastedimage1662622004612v1.png

    This link is in below format.

    https://<CRM_Domain>/api/data/v9.1/contacts(<contact_id>)/cr947_filecontent/

    Here is the result of file in base64 format which I have uploaded for account:

    pastedimage1662623653099v2.png



    Hope this helps!

    Thanks.

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365.


  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to find Path/Location of file stored in a table

    Hi DiePic,

    Open a record and you can get <CRM_Domain> in the url:

    pastedimage1662620861319v1.png

    There are two part in the "contacts(<contact_id>)".

    First, "contacts" is the plural form of a table logical name.  You can find the logical name here:

    pastedimage1662621131706v2.png

    And the "contact id", you could open the record which you want to get it's file in the "MyDocuments" table( You personal table) and can find it in the url:

    pastedimage1662621302277v3.png

    And the "cr947_filecontent" is the logical name of the file field in your "MyDocuments" table.

  • DiePic Profile Picture
    448 on at
    RE: How to find Path/Location of file stored in a table

    Thank you for reply @Maulik Shah

    I'm new in this programs and I've a lot of difficulties to understand. Please can you give me some example?

    https://<CRM_Domain>/api/data/v9.1/contacts(<contact_id>)/cr947_filecontent/$value?size=full

    There is a sure way to obtain this data underlined blue parameters?

  • CRMJetty Profile Picture
    3,512 on at
    RE: How to find Path/Location of file stored in a table

    Hi DiePic ,

    How you will manage your documents in your custom entity(table)? 

    If you using File DataType field for your custom entity then that field file will b e stored in Azure Blob and you can directly access this file by below format.
    Below is the URL Format to download the file content for a file field for a contact record.
    https://<CRM_Domain>/api/data/v9.1/contacts(<contact_id>)/cr947_filecontent?size=full – This will download the content in base64 format string.
    https://<CRM_Domain>/api/data/v9.1/contacts(<contact_id>)/cr947_filecontent/$value?size=full – This will download the content as byte array.

    Also check below links for File type information:
    https://nishantrana.me/2021/10/01/using-file-and-image-data-type-in-dataverse-dynamics-365/
    https://debajmecrm.com/new-data-type-filein-cds-all-you-may-need-to-know-about-it/

    I hope it helps,

    Thanks.

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365.

  • DiePic Profile Picture
    448 on at
    RE: How to find Path/Location of file stored in a table

    Hi Abdul Wahab,

    thank you for replay ... I'm talking about a personal table "MyDocuments", where I store some file of "opportunities".

    All it's working, but I dont know how find the "path variable" and insert in relative column

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at
    RE: How to find Path/Location of file stored in a table

    Hi DIE PIC,

    Do you mean share point location? If Yes then Here you are

    1. Open record in a model-driven app. 
    2. Navigate to the documents tab
    3. Select document
    4. Click on the Open Location button

    pastedimage1662533001978v2.png

    If I answer your question then please mark it as verified.

    Let me know if I can provide you with more details.

    Thanks
    Regards,

    Abdul Wahab
    Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
    Direct/WhatsApp:+923323281237
    E-mail: abdulwahabubit@outlook.com
    Skype: abdul.wahabubit
    Linkedin: www.linkedin.com/.../

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 130

#2
DAnny3211 Profile Picture

DAnny3211 97

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 66 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans