-
Book Overview & Buying
-
Table Of Contents
Mastering Application Development with Force.com
By :
Up to this point in this chapter, we've been using APIs provided by Salesforce. In effect, we're calling into Salesforce to retrieve or manipulate data. These APIs are well thought out, but they have their limitations. For instance, you can create, read, edit, and delete records, but you can only edit and delete individual records. Additionally, the tree creation endpoint, which allows you to create dependent, related objects in a single call, is only in pilot with the Winter '16 release. To help facilitate complex integrations, Salesforce has provided us with the ability to create our own RESTful endpoints, assigning HTTP actions to custom methods that accept custom payloads. We do this by writing custom Apex classes and annotating the class with @RestResource and individual methods with the @httpGet, @httpPatch, @httpPost, and @httpDelete annotations. To illustrate this, let's build a custom REST resource that accepts an opportunity ID and returns the opportunity...
Change the font size
Change margin width
Change background colour