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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Find Document Name attached to record

(0) ShareShare
ReportReport
Posted on by 147

Hi All,

We have a requirement in dynamics 365 (sales) where we want to know the number of documents attached to a record. the listed documents are actually going to SharePoint folder, so here we want to known the list of records with the name.

if possible we want to display it in the SSRS report.

Thanks & regards 

Subhash Mahato

*This post is locked for comments

I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Subhash,

    CRM store the document location and loads the SharePoint view based on that location. This SharePoint view loads the documents from SharePoint directly. CRm doesn't store any information about the documents available in the spceific SP folder.

    In short, there is nothing within CRM you can do to find the number of documents present in the SharePoint. You need to build some custom logic -

    1. Identify the full path of the SP folder location using the document location entity record in CRM

    2. Call SharePoint API's to get documents for that folder location.

    3. Update the value back in CRM

  • Subhash_Mahato Profile Picture
    147 on at

    Thanks Ravi.

    I have another question do we have any events which gets trigger while uploading the document to SharePoint or I need to write a scheduler which read and update the document name in CRM back

    Thanks & Regards

    Subhash Mahato

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Subhash,

    No, this is because the docs are uploaded in the SharePoint view loaded in CRM. CRM just displays the content of that CRM folder. If someone adds the document directly in SharePoint that also will get visible in CRM.  

    There are other triggers which you can get in CRM like create/ update/ delete/ retrieve/ retrieve multiple etc. You can work out if you can use any of these. For example, you can create a plugin which triggers on retrieve, now on this plugin you can call the SP API's and get the count of document and then store it in CRM.

  • Subhash_Mahato Profile Picture
    147 on at

    Thanks Ravi

  • Rits Profile Picture
    105 on at

    Hi Subhash, Did you achieve the requirement. Can you guide me through the code. Thank you.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans