I came across a nice blog post by community member Antonio Mussara today, where he illustrated his answer to a StackOverflow question on how to get a list of all the related documents to an Account record. His response was based on the older v4_1 REST API, and so I thought it would be a good idea to update the example using the newer RESTful API in Sugar 6.7 and later to show how much easier it is to do.
Here’s the full original example from Antonio…
And here’s how to do it in the new REST API
Nearly half the lines of code, and much simpler to understand and work with. Another great reason to move over to using the new API :-)