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
Liferay Portal Security AuditCos'è e come funzione il framework di Security Audit

Vi siete mai chiesti cos'è e come funziona il sistema di Security Audit di Liferay? Ho cercato di rispondere alla domanda non soffermandomi solo al "cosè e come funziona", sono andato ben oltre. Non vi resta che leggere questo EBook per scoprire.

Ottieni il tuo EBook

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...

Liferay SSL/TLS SecurityCome configurare il bundle Liferay per abilitare il protocollo SSL/TLS

Sei curioso di scoprire come configurare il bundle Liferay per funzionare in modalità sicura tramite protocollo SSL/TLS? In questo eBook ( #LFRDEPGUIDE ) ti spiego come farlo step-by-step; per il bundle Apache Tomcat e WildFly. Ricorda di lasciare un tuo feedback dopo averlo letto.