locked
Get shared records RRS feed

  • Question

  • Hi i have a request to create a custom crm view to show shared records. Im currently using the the xml got from this link http://mscrm-chandan.blogspot.com/2013/01/get-shared-records-for-userteam.html . My question is there a way of dynamically detecting current user logged in the view rather then having to specify each users userid i.e

    <condition attribute="principalid" operator ="eq" value=" current user "/>    rather than the below

    <condition attribute="principalid" operator="eq" value="E36D3084-8135-E211-AC03-000C29AD15D1" />


    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="account">
     <link-entity name="principalobjectaccess" to="accountid" from="objectid" link-type="inner" alias="share">
       <filter type="and">
       <condition attribute="principalid" operator="eq" value="E36D3084-8135-E211-AC03-000C29AD15D1" />
       </filter>
     </link-entity>
      </entity>
    </fetch>

    Saturday, July 12, 2014 11:54 AM

Answers

  • try this

    <condition attribute="principalid" operator="eq-userid" />

    this link explains the fetchXML schema, including the operators you can use

    hope this helps

    • Edited by michaelbarry Sunday, July 13, 2014 2:37 PM add link to fetchXML schema
    • Proposed as answer by michaelbarry Sunday, July 13, 2014 2:38 PM
    • Marked as answer by XRM1789 Monday, July 14, 2014 7:08 AM
    Sunday, July 13, 2014 2:34 PM

All replies

  • try this

    <condition attribute="principalid" operator="eq-userid" />

    this link explains the fetchXML schema, including the operators you can use

    hope this helps

    • Edited by michaelbarry Sunday, July 13, 2014 2:37 PM add link to fetchXML schema
    • Proposed as answer by michaelbarry Sunday, July 13, 2014 2:38 PM
    • Marked as answer by XRM1789 Monday, July 14, 2014 7:08 AM
    Sunday, July 13, 2014 2:34 PM
  • Thank you its working 
    Monday, July 14, 2014 7:08 AM