Downloading a Document Revision via Web Services

bsoremsugar —  August 20, 2012 — 2 Comments

We talked last week about how to create a new Document record and upload versions of the document to Sugar via SugarCRM’s Web Services API. Today, we’ll see how to download a revision of a document in a Document record.

The method we’ll use here is get_document_revision, which will return the file for the given Document Revision ID passed to it. Here’s how it works to grab a revision and save the file on your local machine.

Come back tomorrow to see how to download Note attachments.

2 responses to Downloading a Document Revision via Web Services

  1. 

    Thanks for this example, but how can I get the latest revision id, if I have Document id?

Trackbacks and Pingbacks:

  1. SugarCRM Developer Blog » Blog Archive » How to get Document content through PHP code - May 15, 2013

    […] covered grabbing Documents over Web Services in the past, but how about if you are wanting to do it inside the Sugar code base itself? Try this snippet for […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s