How get the List of Opportunities with attachment column attached from Accounts entity ? RRS feed

  • Question

  • Hi All,

    I have requirement to get the all opportunity list with attachment, which attached from accounts entity. So please let me know how we can get it using fetch xml query.

    Account        Opportunity  Attachement

    ABCD1 Opp1                  Attachement1.txt

    ABCD2 Opp2                   Attachement2.txt

    ABCD3 Opp3                  Attachement3.txt

    Note : Here attachments are which attached from account entity.

    Thanks in Advance

    Tuesday, December 23, 2014 11:51 AM


  • Use this fetchxml:

    <?xml version="1.0"?>
    -<fetch distinct="true" mapping="logical" output-format="xml-platform" version="1.0">
    -<entity name="opportunity">
    <attribute name="name"/>
    <attribute name="customerid"/>
    <attribute name="estimatedvalue"/>
    <attribute name="statuscode"/>
    <attribute name="opportunityid"/>
    <order descending="false" attribute="name"/>
    -<link-entity name="account" alias="aa" to="parentaccountid" from="accountid">
    -<link-entity name="annotation" alias="ab" to="accountid" from="objectid">
    -<filter type="and">
    <condition attribute="isdocument" value="1" operator="eq"/>

    Regards, Saad

    Wednesday, December 24, 2014 6:14 AM