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)

Fetch XML to get Sharepointdocument location File Name

(0) ShareShare
ReportReport
Posted on by 483
    
Hello,
Iam trying to get File Name of attachment which i added in Sharepointdocumentlocation but when i use name attribute iam getting location name instead of attached file name . May i know how to get filename and which attribute need to use ?
<link-entity name="sharepointdocumentlocation"from="regardingobjectid" link-type="outer"to="new_caseworkdocumentid" alias="ap" >

                <attribute name="sharepointdocumentlocationid" />

                <attribute name="name" />

                <filter type="and" >

                    <condition attribute="statecode" operator="eq"value="0" />

                </filter>

            </link-entity>

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hello Krishna,

    Hi Krishna did you tried with retrieving  absoluteurl or relativeurl? Seems you need to extract the file name splitting from the  absolute URL /Name /relativeurl.

    Name attributes contains Name of the SharePoint document location record and not exactly  file name . Seems there no attributes contains in entity  sharepointdocumentlocation which stored only  file name .

    Please refer below msdn reference.

    msdn.microsoft.com/.../mt622442.aspx

    docs.microsoft.com/.../sharepointdocumentlocation

    Hope this helps.

  • dkrishna Profile Picture
    483 on at

    sharepoint31.jpg

    How come FileName is showing in Sharepoint locations ? What would be binding fields for Name Column here ?

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    This is another entity in the screenshot you shared called sharepointdocument , could you please check this entity once . I have some doubt as this is for only associated view , not sure you may try.

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="sharepointdocument">
        <attribute name="documentid" />
        <attribute name="fullname" />
        <attribute name="relativelocation" />
        <attribute name="sharepointcreatedon" />
        <attribute name="filetype" />
        <attribute name="modified" />
        <attribute name="sharepointmodifiedby" />
        <attribute name="title" />
        <attribute name="author" />
        <attribute name="sharepointdocumentid" />
        <attribute name="readurl" />
        <attribute name="editurl" />
        <attribute name="ischeckedout" />
        <attribute name="absoluteurl" />
        <attribute name="locationid" />
        <attribute name="iconclassname" />
        <order attribute="relativelocation" descending="false" />
      </entity>
    </fetch>


  • dkrishna Profile Picture
    483 on at

    Iam using SharepointDocumentLocation entity and i didnt find any field which has attachment Name in it .

  • gdas Profile Picture
    50,091 Moderator on at

    Hi Krishhna,

    No in SharepointDocumentLocation  there is no such FileName attributes as I shared you already MSDN reference .

    Please do some alternate way which I have already suggested , it will definitely work for you .

    Otherwise you can wait for someone to reply on this .

  • Suggested answer
    Justinjose Profile Picture
    2,707 on at

    Hi krishna prasad,

    As far as I know, Sharepoint file name is not stored in CRM.

    Thanks

    Justin Jose

  • David Jennaway Profile Picture
    14,065 on at

    Just to clarify, CRM only stores the SharePoint location (i.e. the folder). It does not store any information about the files that are stored in that location (the information about the files is stored solely in SharePoint)

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