-
Notifications
You must be signed in to change notification settings - Fork 520
AtFutureRecipes
pozil edited this page Aug 8, 2023
·
13 revisions
Demonstrates the @future syntax and usage
Group Async Apex Recipes
TESTVISIBLE
FUTURE
Method demonstrates the @future annotation without the (callout=true) adendum. This method will be run in a different Apex transaction than the calling code.
| Param | Description |
|---|---|
data |
String to be logged |
AtFutureRecipes.atFutureMethodWithoutCalloutPrivileges('Some Data');FUTURE
Method demonstrates how an @future anotated method can make an HTTP Callout. This method also demonstrates the necessary steps to make an HTTP callout without the RestClient abstraction layer. The RestClient class can be found in the 'Shared Code' group.
| Param | Description |
|---|---|
url |
The URL to make a callout to. |
AtFutureRecipes.atFutureMethodWithCalloutPrivileges('google.com');