Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7018289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:01:40+00:00 2026-05-27T23:01:40+00:00

i am using SOAP API for SugarCRM . I want to download document using

  • 0

i am using SOAP API for SugarCRM.
I want to download document using PHP.
I have no idea how to download the document.
Thanks in Advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:01:41+00:00Added an answer on May 27, 2026 at 11:01 pm

    There are generally two “types” of documents in sugarcrm. Those added to the Document module and those added to the History sub panel in e.g. the Account module.

    To retrieve documents linked to accounts you should look in the notes table. This also contains everything else from the history sub panel which are linked to the account, e.g. emails. You can properly filter on the document_type column, if all documents are using the same document_type. (Replace [account_id] and [session_id])

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sug="http://www.sugarcrm.com/sugarcrm" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
       <soapenv:Header/>
       <soapenv:Body>
          <sug:get_entry_list soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <session xsi:type="xsd:string">[session_id]/session>
             <module_name xsi:type="xsd:string">Notes</module_name>
             <query xsi:type="xsd:string">parent_type = 'Accounts' AND parent_id = '[account_id]'</query>
             <order_by xsi:type="xsd:string"></order_by>
             <offset xsi:type="xsd:int">0</offset>
             <select_fields xsi:type="sug:select_fields" soapenc:arrayType="xsd:string[1]">
               <select_fields xsi:type="xsd:string">id</select_fields>
           <select_fields xsi:type="xsd:string">name</select_fields>
               <select_fields xsi:type="xsd:string">filename</select_fields>
               <select_fields xsi:type="xsd:string">document_revision_id</select_fields>
             </select_fields>
             <max_results xsi:type="xsd:int">100</max_results>
             <deleted xsi:type="xsd:int">0</deleted>
          </sug:get_entry_list>
       </soapenv:Body>
    </soapenv:Envelope> 
    

    To get documents from the Documents module, you basically do the same, but it takes two steps. First retrieve the documents from the documents table and afterwards use the document_revision_id to retrieve the document id and filename from the document_revisions table.

    In order to download/retrieve a document, you need the id and the filename. Files are usually stored in /cache/upload in you sugarcrm root folder and are named with the id.
    So if a document has id=a06bfc2e-c6e9-ac53-9e7b-4bf4e4d862ca, the document can be retrieved from http://my-suger/cache/upload/a06bfc2e-c6e9-ac53-9e7b-4bf4e4d862ca. The retrieved file should than be renamed to the filename, which you get from the web service response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using the Salesforce SOAP API via PHP, if I have an object which
I have written a webservice using the PHP SOAP classes. It has functions to
I have no problem importing simple products using Magento Core API (SOAP). How can
I'm trying to access a SOAP API using Suds. The SOAP API documentation states
I'm working with SOAP using the javax.xml.soap package. I have a javax.xml.soap.SOAPMessage object that
I'm trying to implement a stateful web service in PHP using the SOAP extension.
I want to build a SOAP client using ruby. I tried using the soap4r
When using the SOAP API to work with salesforce.com (SFDC) it seems that the
I am successfully creating a Task using the SalesForce API SOAP API through Java.
This is the SOAP document I'm trying to model using SOAP::Lite. <SOAP-ENV:Envelope xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/ xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.