SugarCRM: How to get list of all documents related to an account

A few days ago I responded to a question on stackoverflow.com which posed the question of how to get through the web services exposed by SugarCRM list of documents relating to a particular account.

Among the operations that are available as web services that takes the name of get_relationships is the one that answers the question asked. The support portal is available extensive documentation of this operation, in addition, this operation is accessible via REST and SOAP away. The operation get_relationships retrieves the data of a specific relationship for a specific record.

The examples section of the documentation get_relationships shows an example of use, just make adjustments alone operation input parameters for our case of interest. In Listing 1 shows the array of input parameters to retrieve documents related to the account and Listing 2 shows the result.

On my public repository is available at https://gist.github.com/amusarra/6436845 the complete example of the call to REST service get_relationships. The same applies to the call to the service using SOAP. Regarding the interaction with SOAP services SugarCRM, there are a variety of sources, some of which are available on my blog and slideshare:

The SugarCRM REST services will gradually replacing SOAP services, they were a bit backwards in terms of the most recent standards.

Listing 1. Input parameters to retrieve documents related to the account

Listing 2. Result returned by the operation get_relationships.

Enhanced by Zemanta

Antonio Musarra

I began my journey into the world of computing from an Olivetti M24 PC (http://it.wikipedia.org/wiki/Olivetti_M24) bought by my father for his work. Day after day, quickly taking control until … Now doing business consulting for projects in the enterprise application development using web-oriented technologies such as J2EE, Web Services, ESB, TIBCO, PHP.

You may also like...