This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
salesforce [2021/04/29 04:26] windsor_ai |
salesforce [2021/05/18 05:27] windsor_ai |
||
---|---|---|---|
Line 14: | Line 14: | ||
Sample query: | Sample query: | ||
- | < | + | < |
=== Date range === | === Date range === | ||
- | * Relative: Filter for a relative date range in which the objects requested were last modified at (e.g. Contact Last Modified Date for any field related to Contacts). Example: date_preset=last_7d | + | |
- | * Absolute: Filter for an absolute date range in which the objects requested were last modified at (e.g. Contact Last Modified Date for any field related to Contacts). Example date_from=2021-01-01& | + | |
- | * None: If neither absolute or relative date ranges are specified data from the requested objects last modified in the last 3days (e.g. Contact Last Modified Date for any field related to Contacts) will be returned. | + | |
+ | |||
+ | * **Not specified** \\ If neither absolute or relative date ranges are specified data from the requested objects last modified in the last 3days (e.g. Contact Last Modified Date for any field related to Contacts) will be returned. | ||
+ | |||
+ | === Working with custom fields === | ||
+ | |||
+ | In case your Salesforce instance has custom fields and custom objects you can also query them. The syntax is slightly different. First of all you would need to identify the ***API Name*** of the custom field. You can do so by navigating to Setup -> Customize -> Under any Standard Object -> Fields. | ||
+ | |||
+ | You can then find the API name | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Custom fields can be identified easily as they either end with " | ||
+ | |||
+ | To build a query this way you specify the object name with square brackets followed by the field name. | ||
+ | |||
+ | Example: | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | Will retrieve the custom field External Display Name from the standard **Campaign object**. | ||
+ | |||
+ | < | ||
+ | [Sales_Order__c]TOTAL_Invoice_Price__c | ||
+ | </ | ||
+ | |||
+ | Will retrieve the custom field **TOTAL Invoice Price** from the custom **Sales Order Object**. | ||
+ | |||
+ | The complete API URLs will look like this | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | and the response would look similar to this: | ||
+ | |||
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | ...</ |