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.
i am using SOAP API for SugarCRM . I want to download document using
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
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
notestable. 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])To get documents from the Documents module, you basically do the same, but it takes two steps. First retrieve the documents from the
documentstable and afterwards use thedocument_revision_idto retrieve the documentidandfilenamefrom thedocument_revisionstable.In order to download/retrieve a document, you need the
idand thefilename. Files are usually stored in/cache/uploadin you sugarcrm root folder and are named with theid.So if a document has
id=a06bfc2e-c6e9-ac53-9e7b-4bf4e4d862ca, the document can be retrieved fromhttp://my-suger/cache/upload/a06bfc2e-c6e9-ac53-9e7b-4bf4e4d862ca. The retrieved file should than be renamed to thefilename, which you get from the web service response.