├── .gitignore
├── README.md
├── config
└── project-scratch-def.json
├── force-app
└── main
│ └── default
│ ├── applications
│ └── Continuation.app-meta.xml
│ ├── aura
│ ├── ContinuationBroker
│ │ ├── ContinuationBroker.cmp
│ │ ├── ContinuationBroker.cmp-meta.xml
│ │ └── ContinuationBrokerController.js
│ ├── ContinuationBrokerDemo
│ │ ├── ContinuationBrokerDemo.cmp
│ │ ├── ContinuationBrokerDemo.cmp-meta.xml
│ │ ├── ContinuationBrokerDemo.css
│ │ └── ContinuationBrokerDemoController.js
│ ├── ContinuationProxy
│ │ ├── ContinuationProxy.cmp
│ │ ├── ContinuationProxy.cmp-meta.xml
│ │ ├── ContinuationProxyController.js
│ │ └── ContinuationProxyHelper.js
│ ├── ContinuationProxyDemo
│ │ ├── ContinuationProxyDemo.cmp
│ │ ├── ContinuationProxyDemo.cmp-meta.xml
│ │ ├── ContinuationProxyDemo.css
│ │ └── ContinuationProxyDemoController.js
│ ├── ContinuationRequest
│ │ ├── ContinuationRequest.evt
│ │ └── ContinuationRequest.evt-meta.xml
│ └── SimpleContinuationDemo
│ │ ├── SimpleContinuationDemo.cmp
│ │ ├── SimpleContinuationDemo.cmp-meta.xml
│ │ ├── SimpleContinuationDemo.css
│ │ └── SimpleContinuationDemoController.js
│ ├── classes
│ ├── ContinuationController.cls
│ ├── ContinuationController.cls-meta.xml
│ ├── SimpleContinuationController.cls
│ └── SimpleContinuationController.cls-meta.xml
│ ├── flexipages
│ ├── Continuation.flexipage-meta.xml
│ ├── Continuation_Examples.flexipage-meta.xml
│ └── Continuation_UtilityBar.flexipage-meta.xml
│ ├── pages
│ ├── ContinuationProxy.page
│ ├── ContinuationProxy.page-meta.xml
│ ├── SimpleContinuation.page
│ └── SimpleContinuation.page-meta.xml
│ ├── permissionsets
│ └── continuation.permissionset-meta.xml
│ ├── profiles
│ ├── Admin.profile-meta.xml
│ ├── Custom%3A Marketing Profile.profile-meta.xml
│ ├── Custom%3A Sales Profile.profile-meta.xml
│ └── Custom%3A Support Profile.profile-meta.xml
│ ├── remoteSiteSettings
│ └── LongRunningService.remoteSite-meta.xml
│ └── tabs
│ ├── Continuation.tab-meta.xml
│ └── Continuation_Examples.tab-meta.xml
└── sfdx-project.json
/.gitignore:
--------------------------------------------------------------------------------
1 | .classpath
2 | .DS_Store
3 | .sfdx
4 | .project
5 | .salesforce
6 | node_modules
7 | .idea
8 | .tern-project
9 | .settings
10 | selenium-client-jars/
11 | test/artifacts
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Calling an Apex Continuation from a Lightning Component
2 |
3 | Read [this blog post](https://developer.salesforce.com/blogs/developer-relations/) to learn more about the examples in this repository.
4 |
5 | ## Installation Instructions
6 |
7 | 1. Authenticate with your hub org (if not already done):
8 | ```
9 | sfdx force:auth:web:login -d -a myhuborg
10 | ```
11 |
12 | 1. Clone the repository:
13 | ```
14 | git clone https://github.com/ccoenraets/lightning-component-apex-continuation
15 | cd lightning-component-apex-continuation
16 | ```
17 |
18 | 1. Create a scratch org and provide it with an alias (continuations):
19 | ```
20 | sfdx force:org:create -s -f config/project-scratch-def.json -a continuations
21 | ```
22 |
23 | 1. Push the app to your scratch org:
24 | ```
25 | sfdx force:source:push
26 | ```
27 |
28 | 1. Assign the ```continuation``` permission set to the default user:
29 | ```
30 | sfdx force:user:permset:assign -n continuation
31 | ```
32 |
33 | 1. Open the scratch org:
34 | ```
35 | sfdx force:org:open
36 | ```
37 |
38 | 1. Open the Continuation sample app in the App Launcher
--------------------------------------------------------------------------------
/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "ccoenraets Company",
3 | "edition": "Developer",
4 | "orgPreferences" : {
5 | "enabled": ["S1DesktopEnabled"]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/force-app/main/default/applications/Continuation.app-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #0070D2
5 |
6 | Large
7 |
8 | Standard
9 | Continuation
10 | Continuation_Examples
11 | Lightning
12 | Continuation_UtilityBar
13 |
14 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationBroker/ContinuationBroker.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationBroker/ContinuationBroker.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | A Lightning Component Bundle
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationBroker/ContinuationBrokerController.js:
--------------------------------------------------------------------------------
1 | ({
2 | onContinuationRequest : function(component, event, helper) {
3 | var methodName = event.getParam("methodName");
4 | var methodParams = event.getParam("methodParams");
5 | methodParams = JSON.parse(JSON.stringify(methodParams));
6 | var callback = event.getParam("callback");
7 | component.find("proxy").invoke(methodName, methodParams, callback);
8 | }
9 |
10 | })
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationBrokerDemo/ContinuationBrokerDemo.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationBrokerDemo/ContinuationBrokerDemo.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | A Lightning Component Bundle
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationBrokerDemo/ContinuationBrokerDemo.css:
--------------------------------------------------------------------------------
1 | .THIS .slds-card__body {
2 | padding: 8px;
3 | }
4 |
5 | .THIS .slds-form-element {
6 | margin: 4px 0;
7 | }
8 |
9 | .THIS textarea {
10 | height: 150px;
11 | }
12 |
13 | .THIS button {
14 | margin-bottom: 4px;
15 | }
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationBrokerDemo/ContinuationBrokerDemoController.js:
--------------------------------------------------------------------------------
1 | ({
2 | getProduct : function(component, event, helper) {
3 | var productId = component.get("v.productId");
4 | var latency = component.get("v.latency");
5 | var request = $A.get("e.c:ContinuationRequest");
6 | request.setParams({
7 | methodName: "getProduct",
8 | methodParams: [productId, latency],
9 | callback: function(result) {
10 | var plainText = result.replace(/"/g, '"').replace(/'/g, "'");
11 | component.set("v.result", plainText);
12 | }
13 | });
14 | request.fire();
15 | },
16 |
17 | getProducts : function(component, event, helper) {
18 | var latency = component.get("v.latency");
19 | var request = $A.get("e.c:ContinuationRequest");
20 | request.setParams({
21 | methodName: "getProducts",
22 | methodParams: [latency],
23 | callback: function(result) {
24 | var plainText = result.replace(/"/g, '"').replace(/'/g, "'");
25 | component.set("v.result", plainText);
26 | }
27 | });
28 | request.fire();
29 | },
30 |
31 | })
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationProxy/ContinuationProxy.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationProxy/ContinuationProxy.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | A Lightning Component Bundle
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationProxy/ContinuationProxyController.js:
--------------------------------------------------------------------------------
1 | ({
2 | doInit: function (component, event, helper) {
3 |
4 | component.invocationCallbacks = {};
5 |
6 | var action = component.get("c.getVFBaseURL");
7 | action.setStorable();
8 | action.setCallback(this, function (response) {
9 | var vfBaseURL = response.getReturnValue();
10 | component.set("v.vfBaseURL", vfBaseURL);
11 | var topic = component.get("v.topic");
12 | window.addEventListener("message", function (event) {
13 | if (event.origin !== vfBaseURL) {
14 | // Not the expected origin: reject message
15 | return;
16 | }
17 | // Only handle messages we are interested in
18 | if (event.data.topic === topic) {
19 | // Retrieve the callback for the specified invocation id
20 | var callback = component.invocationCallbacks[event.data.invocationId];
21 | if (callback && typeof callback == 'function') {
22 | callback(event.data.result);
23 | delete component.invocationCallbacks[event.data.invocationId];
24 | }
25 | }
26 | }, false);
27 | });
28 | $A.enqueueAction(action);
29 | },
30 |
31 | doInvoke: function (component, event, helper) {
32 | var vfBaseURL = component.get("v.vfBaseURL");
33 | var topic = component.get("v.topic");
34 | var args = event.getParam('arguments');
35 | var invocationId = helper.getUniqueId();
36 | component.invocationCallbacks[invocationId] = args.callback;
37 | var message = {
38 | topic: topic,
39 | invocationId: invocationId,
40 | methodName: args.methodName,
41 | methodParams: args.methodParams
42 | };
43 | var vf = component.find("vfFrame").getElement().contentWindow;
44 | vf.postMessage(message, vfBaseURL);
45 | }
46 |
47 | })
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationProxy/ContinuationProxyHelper.js:
--------------------------------------------------------------------------------
1 | ({
2 | getUniqueId : function() {
3 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
4 | var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
5 | return v.toString(16);
6 | });
7 | }
8 | })
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationProxyDemo/ContinuationProxyDemo.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationProxyDemo/ContinuationProxyDemo.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | A Lightning Component Bundle
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationProxyDemo/ContinuationProxyDemo.css:
--------------------------------------------------------------------------------
1 | .THIS .slds-card__body {
2 | padding: 8px;
3 | }
4 |
5 | .THIS .slds-form-element {
6 | margin: 4px 0;
7 | }
8 |
9 | .THIS textarea {
10 | height: 150px;
11 | }
12 |
13 | .THIS button {
14 | margin-bottom: 4px;
15 | }
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationProxyDemo/ContinuationProxyDemoController.js:
--------------------------------------------------------------------------------
1 | ({
2 | getProduct : function(component, event, helper) {
3 | var productId = component.get("v.productId");
4 | var latency = component.get("v.latency");
5 | component.find("proxy").invoke("getProduct", [productId, latency], function(result) {
6 | var plainText = result.replace(/"/g, '"').replace(/'/g, "'");
7 | component.set("v.result", plainText);
8 | })
9 | },
10 |
11 | getProducts : function(component, event, helper) {
12 | var latency = component.get("v.latency");
13 | component.find("proxy").invoke("getProducts", [latency], function(result) {
14 | var plainText = result.replace(/"/g, '"').replace(/'/g, "'");
15 | component.set("v.result", plainText);
16 | })
17 | },
18 |
19 | })
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationRequest/ContinuationRequest.evt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/ContinuationRequest/ContinuationRequest.evt-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | A Lightning Component Bundle
5 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/SimpleContinuationDemo/SimpleContinuationDemo.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/SimpleContinuationDemo/SimpleContinuationDemo.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | A Lightning Component Bundle
5 |
6 |
--------------------------------------------------------------------------------
/force-app/main/default/aura/SimpleContinuationDemo/SimpleContinuationDemo.css:
--------------------------------------------------------------------------------
1 | .THIS .slds-card__body {
2 | padding: 8px;
3 | }
4 |
5 | .THIS .slds-form-element {
6 | margin: 4px 0;
7 | }
8 |
9 | .THIS textarea {
10 | height: 150px;
11 | }
--------------------------------------------------------------------------------
/force-app/main/default/aura/SimpleContinuationDemo/SimpleContinuationDemoController.js:
--------------------------------------------------------------------------------
1 | ({
2 | doInit: function (component, event, helper) {
3 | var vfBaseURL = "https://" + component.get("v.vfHost");
4 | // Listen for messages posted by the iframed VF page
5 | window.addEventListener("message", function (event) {
6 | if (event.origin !== vfBaseURL) {
7 | // Not the expected origin: reject message
8 | return;
9 | }
10 | // Only handle messages we are interested in
11 | if (event.data.topic === "com.mycompany.message") {
12 | var result = event.data.result;
13 | var plainText = result.replace(/"/g, '"').replace(/'/g, "'");
14 | component.set("v.result", plainText);
15 | }
16 | }, false);
17 | },
18 |
19 | getProduct: function (component, event, helper) {
20 | var vfBaseURL = "https://" + component.get("v.vfHost");
21 | var vf = component.find("vfFrame").getElement().contentWindow;
22 | var message = {
23 | topic: "com.mycompany.message",
24 | productId: component.get("v.productId"),
25 | latency: component.get("v.latency"),
26 | };
27 | vf.postMessage(message, vfBaseURL);
28 | }
29 | })
--------------------------------------------------------------------------------
/force-app/main/default/classes/ContinuationController.cls:
--------------------------------------------------------------------------------
1 | global with sharing class ContinuationController {
2 |
3 | public ContinuationController() {
4 | String hostname = URL.getSalesforceBaseUrl().getHost();
5 | String mydomain = hostname.substring(0, hostname.indexOf('--c'));
6 | String lcBaseURL = 'https://' + mydomain + '.lightning.force.com';
7 | Map headers = Apexpages.currentPage().getHeaders();
8 | headers.put('X-Frame-Options', 'ALLOW-FROM ' + lcBaseURL);
9 | headers.put('Content-Security-Policy', 'frame-ancestors ' + lcBaseURL);
10 | }
11 |
12 | @AuraEnabled
13 | public static String getVFBaseURL() {
14 | User user = [SELECT fullPhotoUrl FROM User WHERE userType = 'Standard' LIMIT 1];
15 | // The above query returns a URL like https://my-domain-dev-ed--c.na50.content.force.com/profilephoto/001/A
16 | // Let's use the two first fragments of that URL to create the VF base URL
17 | List fragments = user.fullPhotoUrl.split('\\.');
18 | return fragments[0] + '.' + fragments[1] + '.visual.force.com';
19 | }
20 |
21 | // Called via JavaScript Remoting
22 | @RemoteAction
23 | global static Object invoke(String methodName, String[] params) {
24 |
25 | if (methodName == 'getProducts') {
26 | // Make an HTTPRequest as we normally would
27 | // Remember to configure a Remote Site Setting for the service!
28 | String url = 'https://long-running.herokuapp.com/products?latency=' + params[0];
29 | HttpRequest req = new HttpRequest();
30 | req.setMethod('GET');
31 | req.setEndpoint(url);
32 |
33 | // Create a Continuation for the HTTPRequest
34 | Continuation con = new Continuation(60);
35 | con.state = con.addHttpRequest(req);
36 | con.continuationMethod = 'callback';
37 |
38 | // Return it to the system for processing
39 | return con;
40 | } else if (methodName == 'getProduct') {
41 | // Make an HTTPRequest as we normally would
42 | // Remember to configure a Remote Site Setting for the service!
43 | String url = 'https://long-running.herokuapp.com/products/' + params[0] + '?latency=' + params[1];
44 | HttpRequest req = new HttpRequest();
45 | req.setMethod('GET');
46 | req.setEndpoint(url);
47 |
48 | // Create a Continuation for the HTTPRequest
49 | Continuation con = new Continuation(60);
50 | con.state = con.addHttpRequest(req);
51 | con.continuationMethod = 'callback';
52 |
53 | // Return it to the system for processing
54 | return con;
55 | } else {
56 | return null;
57 | }
58 | }
59 |
60 | global static Object callback(Object state) {
61 | HttpResponse response = Continuation.getResponse((String)state);
62 | Integer statusCode = response.getStatusCode();
63 | if (statusCode >= 2000) {
64 | return 'Continuation error: ' + statusCode;
65 | }
66 | return response.getBody();
67 | }
68 |
69 | }
--------------------------------------------------------------------------------
/force-app/main/default/classes/ContinuationController.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/main/default/classes/SimpleContinuationController.cls:
--------------------------------------------------------------------------------
1 | global with sharing class SimpleContinuationController {
2 |
3 | // This value can be externalized in a Custom Setting or calculated based on the VF URL
4 | global static String lcOrigin = 'https://momentum-efficiency-4004-dev-ed.lightning.force.com';
5 |
6 | public SimpleContinuationController() {
7 | Apexpages.currentPage().getHeaders().put('X-Frame-Options', 'ALLOW-FROM ' + lcOrigin);
8 | Apexpages.currentPage().getHeaders().put('Content-Security-Policy', 'frame-ancestors ' + lcOrigin);
9 | }
10 |
11 | // Called via JavaScript Remoting
12 | @RemoteAction
13 | global static Object getProduct(Integer productId, Integer latency){
14 |
15 | // Make an HTTPRequest as we normally would
16 | // Remember to configure a Remote Site Setting for the service!
17 | String url = 'https://long-running.herokuapp.com/products/' + productId + '?latency=' + latency;
18 | HttpRequest req = new HttpRequest();
19 | req.setMethod('GET');
20 | req.setEndpoint(url);
21 |
22 | // Create a Continuation for the HTTPRequest
23 | Continuation con = new Continuation(60);
24 | con.state = con.addHttpRequest(req);
25 | con.continuationMethod = 'callback';
26 |
27 | // Return it to the system for processing
28 | return con;
29 | }
30 |
31 | global static Object callback(Object state) {
32 | HttpResponse response = Continuation.getResponse((String)state);
33 |
34 | Integer statusCode = response.getStatusCode();
35 | if (statusCode >= 2000) {
36 | return 'Continuation error: ' + statusCode;
37 | }
38 |
39 | return response.getBody();
40 | }
41 |
42 | }
--------------------------------------------------------------------------------
/force-app/main/default/classes/SimpleContinuationController.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | Active
5 |
--------------------------------------------------------------------------------
/force-app/main/default/flexipages/Continuation.flexipage-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SimpleContinuationDemo
6 |
7 |
8 | ContinuationProxyDemo
9 |
10 | region1
11 | Region
12 |
13 |
14 | region2
15 | Region
16 |
17 |
18 | region3
19 | Region
20 |
21 | Continuation
22 |
23 | flexipage:appHomeTemplateHeaderTwoColumnsLeftSidebar
24 |
25 | AppPage
26 |
27 |
--------------------------------------------------------------------------------
/force-app/main/default/flexipages/Continuation_Examples.flexipage-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SimpleContinuationDemo
6 |
7 | column1
8 | Region
9 |
10 |
11 |
12 | ContinuationProxyDemo
13 |
14 | column2
15 | Region
16 |
17 | Continuation Examples
18 |
19 | flexipage:appHomeTemplateTwoColumns
20 |
21 | AppPage
22 |
23 |
--------------------------------------------------------------------------------
/force-app/main/default/flexipages/Continuation_UtilityBar.flexipage-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | utilityItems
5 | Region
6 |
7 | Continuation UtilityBar
8 |
9 | one:utilityBarTemplateDesktop
10 |
11 | UtilityBar
12 |
13 |
--------------------------------------------------------------------------------
/force-app/main/default/pages/ContinuationProxy.page:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/force-app/main/default/pages/ContinuationProxy.page-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | false
5 | false
6 |
7 |
8 | 1
9 | 11
10 | sf_chttr_apps
11 |
12 |
13 |
--------------------------------------------------------------------------------
/force-app/main/default/pages/SimpleContinuation.page:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/force-app/main/default/pages/SimpleContinuation.page-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40.0
4 | false
5 | false
6 |
7 |
8 | 1
9 | 11
10 | sf_chttr_apps
11 |
12 |
13 |
--------------------------------------------------------------------------------
/force-app/main/default/permissionsets/continuation.permissionset-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 |
5 |
6 | Continuation
7 | Visible
8 |
9 |
10 | Continuation_Examples
11 | Visible
12 |
13 |
14 |
--------------------------------------------------------------------------------
/force-app/main/default/profiles/Admin.profile-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Continuation
5 | false
6 | true
7 |
8 |
9 | ContinuationController
10 | true
11 |
12 |
13 | SimpleContinuationController
14 | true
15 |
16 | false
17 |
18 | ContinuationProxy
19 | true
20 |
21 |
22 | SimpleContinuation
23 | true
24 |
25 |
26 | Continuation_Examples
27 | DefaultOn
28 |
29 | Salesforce
30 |
31 | true
32 | ActivateContract
33 |
34 |
35 | true
36 | ActivateOrder
37 |
38 |
39 | true
40 | AddDirectMessageMembers
41 |
42 |
43 | true
44 | AllowUniversalSearch
45 |
46 |
47 | true
48 | AllowViewKnowledge
49 |
50 |
51 | true
52 | ApiEnabled
53 |
54 |
55 | true
56 | AssignPermissionSets
57 |
58 |
59 | true
60 | AssignTopics
61 |
62 |
63 | true
64 | AuthorApex
65 |
66 |
67 | true
68 | BulkMacrosAllowed
69 |
70 |
71 | true
72 | CanInsertFeedSystemFields
73 |
74 |
75 | true
76 | CanUseNewDashboardBuilder
77 |
78 |
79 | true
80 | CanVerifyComment
81 |
82 |
83 | true
84 | ChatterEditOwnPost
85 |
86 |
87 | true
88 | ChatterEditOwnRecordPost
89 |
90 |
91 | true
92 | ChatterFileLink
93 |
94 |
95 | true
96 | ChatterInternalUser
97 |
98 |
99 | true
100 | ChatterInviteExternalUsers
101 |
102 |
103 | true
104 | ChatterOwnGroups
105 |
106 |
107 | true
108 | ConnectOrgToEnvironmentHub
109 |
110 |
111 | true
112 | ContentAdministrator
113 |
114 |
115 | true
116 | ContentWorkspaces
117 |
118 |
119 | true
120 | ConvertLeads
121 |
122 |
123 | true
124 | CreateCustomizeDashboards
125 |
126 |
127 | true
128 | CreateCustomizeFilters
129 |
130 |
131 | true
132 | CreateCustomizeReports
133 |
134 |
135 | true
136 | CreateDashboardFolders
137 |
138 |
139 | true
140 | CreateReportFolders
141 |
142 |
143 | true
144 | CreateTopics
145 |
146 |
147 | true
148 | CreateWorkBadgeDefinition
149 |
150 |
151 | true
152 | CreateWorkspaces
153 |
154 |
155 | true
156 | CustomizeApplication
157 |
158 |
159 | true
160 | DelegatedTwoFactor
161 |
162 |
163 | true
164 | DeleteActivatedContract
165 |
166 |
167 | true
168 | DeleteTopics
169 |
170 |
171 | true
172 | DistributeFromPersWksp
173 |
174 |
175 | true
176 | EditActivatedOrders
177 |
178 |
179 | true
180 | EditBillingInfo
181 |
182 |
183 | true
184 | EditBrandTemplates
185 |
186 |
187 | true
188 | EditCaseComments
189 |
190 |
191 | true
192 | EditEvent
193 |
194 |
195 | true
196 | EditHtmlTemplates
197 |
198 |
199 | true
200 | EditKnowledge
201 |
202 |
203 | true
204 | EditMyDashboards
205 |
206 |
207 | true
208 | EditMyReports
209 |
210 |
211 | true
212 | EditOppLineItemUnitPrice
213 |
214 |
215 | true
216 | EditPublicDocuments
217 |
218 |
219 | true
220 | EditPublicFilters
221 |
222 |
223 | true
224 | EditPublicTemplates
225 |
226 |
227 | true
228 | EditReadonlyFields
229 |
230 |
231 | true
232 | EditTask
233 |
234 |
235 | true
236 | EditTopics
237 |
238 |
239 | true
240 | EmailMass
241 |
242 |
243 | true
244 | EmailSingle
245 |
246 |
247 | true
248 | EnableCommunityAppLauncher
249 |
250 |
251 | true
252 | EnableNotifications
253 |
254 |
255 | true
256 | ExportReport
257 |
258 |
259 | true
260 | FieldServiceAccess
261 |
262 |
263 | true
264 | ImportCustomObjects
265 |
266 |
267 | true
268 | ImportLeads
269 |
270 |
271 | true
272 | ImportPersonal
273 |
274 |
275 | true
276 | InstallPackaging
277 |
278 |
279 | true
280 | LightningConsoleAllowedForUser
281 |
282 |
283 | true
284 | LightningExperienceUser
285 |
286 |
287 | true
288 | ListEmailSend
289 |
290 |
291 | true
292 | ManageAnalyticSnapshots
293 |
294 |
295 | true
296 | ManageAuthProviders
297 |
298 |
299 | true
300 | ManageBusinessHourHolidays
301 |
302 |
303 | true
304 | ManageCallCenters
305 |
306 |
307 | true
308 | ManageCases
309 |
310 |
311 | true
312 | ManageCategories
313 |
314 |
315 | true
316 | ManageCertificates
317 |
318 |
319 | true
320 | ManageContentPermissions
321 |
322 |
323 | true
324 | ManageContentProperties
325 |
326 |
327 | true
328 | ManageContentTypes
329 |
330 |
331 | true
332 | ManageCustomPermissions
333 |
334 |
335 | true
336 | ManageCustomReportTypes
337 |
338 |
339 | true
340 | ManageDashbdsInPubFolders
341 |
342 |
343 | true
344 | ManageDataCategories
345 |
346 |
347 | true
348 | ManageDataIntegrations
349 |
350 |
351 | true
352 | ManageDynamicDashboards
353 |
354 |
355 | true
356 | ManageEmailClientConfig
357 |
358 |
359 | true
360 | ManageExchangeConfig
361 |
362 |
363 | true
364 | ManageHealthCheck
365 |
366 |
367 | true
368 | ManageInteraction
369 |
370 |
371 | true
372 | ManageInternalUsers
373 |
374 |
375 | true
376 | ManageIpAddresses
377 |
378 |
379 | true
380 | ManageKnowledge
381 |
382 |
383 | true
384 | ManageKnowledgeImportExport
385 |
386 |
387 | true
388 | ManageLeads
389 |
390 |
391 | true
392 | ManageLoginAccessPolicies
393 |
394 |
395 | true
396 | ManageMobile
397 |
398 |
399 | true
400 | ManageNetworks
401 |
402 |
403 | true
404 | ManagePackageLicenses
405 |
406 |
407 | true
408 | ManagePasswordPolicies
409 |
410 |
411 | true
412 | ManageProfilesPermissionsets
413 |
414 |
415 | true
416 | ManagePvtRptsAndDashbds
417 |
418 |
419 | true
420 | ManageRemoteAccess
421 |
422 |
423 | true
424 | ManageReportsInPubFolders
425 |
426 |
427 | true
428 | ManageRoles
429 |
430 |
431 | true
432 | ManageSearchPromotionRules
433 |
434 |
435 | true
436 | ManageSharing
437 |
438 |
439 | true
440 | ManageSolutions
441 |
442 |
443 | true
444 | ManageSynonyms
445 |
446 |
447 | true
448 | ManageUnlistedGroups
449 |
450 |
451 | true
452 | ManageUsers
453 |
454 |
455 | true
456 | MassInlineEdit
457 |
458 |
459 | true
460 | MergeTopics
461 |
462 |
463 | true
464 | ModerateChatter
465 |
466 |
467 | true
468 | ModifyAllData
469 |
470 |
471 | true
472 | NewReportBuilder
473 |
474 |
475 | true
476 | Packaging2
477 |
478 |
479 | true
480 | RemoveDirectMessageMembers
481 |
482 |
483 | true
484 | ResetPasswords
485 |
486 |
487 | true
488 | RunReports
489 |
490 |
491 | true
492 | ScheduleReports
493 |
494 |
495 | true
496 | SelectFilesFromSalesforce
497 |
498 |
499 | true
500 | SendExternalEmailAvailable
501 |
502 |
503 | true
504 | SendSitRequests
505 |
506 |
507 | true
508 | ShareInternalArticles
509 |
510 |
511 | true
512 | ShowCompanyNameAsUserBadge
513 |
514 |
515 | true
516 | SolutionImport
517 |
518 |
519 | true
520 | SubmitMacrosAllowed
521 |
522 |
523 | true
524 | SubscribeReportToOtherUsers
525 |
526 |
527 | true
528 | SubscribeReportsRunAsUser
529 |
530 |
531 | true
532 | SubscribeToLightningReports
533 |
534 |
535 | true
536 | TransferAnyCase
537 |
538 |
539 | true
540 | TransferAnyEntity
541 |
542 |
543 | true
544 | TransferAnyLead
545 |
546 |
547 | true
548 | UseTeamReassignWizards
549 |
550 |
551 | true
552 | UseWebLink
553 |
554 |
555 | true
556 | ViewAllData
557 |
558 |
559 | true
560 | ViewAllUsers
561 |
562 |
563 | true
564 | ViewDataAssessment
565 |
566 |
567 | true
568 | ViewDataCategories
569 |
570 |
571 | true
572 | ViewEventLogFiles
573 |
574 |
575 | true
576 | ViewHealthCheck
577 |
578 |
579 | true
580 | ViewHelpLink
581 |
582 |
583 | true
584 | ViewMyTeamsDashboards
585 |
586 |
587 | true
588 | ViewPublicDashboards
589 |
590 |
591 | true
592 | ViewPublicReports
593 |
594 |
595 | true
596 | ViewSetup
597 |
598 |
599 | true
600 | WorkCalibrationUser
601 |
602 |
603 |
--------------------------------------------------------------------------------
/force-app/main/default/profiles/Custom%3A Marketing Profile.profile-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Continuation
5 | false
6 | false
7 |
8 |
9 | ContinuationController
10 | false
11 |
12 |
13 | SimpleContinuationController
14 | false
15 |
16 | true
17 |
18 | ContinuationProxy
19 | false
20 |
21 |
22 | SimpleContinuation
23 | false
24 |
25 |
26 | Continuation_Examples
27 | DefaultOn
28 |
29 | Salesforce
30 |
31 | true
32 | AllowViewKnowledge
33 |
34 |
35 | true
36 | ApiEnabled
37 |
38 |
39 | true
40 | AssignTopics
41 |
42 |
43 | true
44 | ChatterForSharePoint
45 |
46 |
47 | true
48 | ChatterInternalUser
49 |
50 |
51 | true
52 | ChatterInviteExternalUsers
53 |
54 |
55 | true
56 | ChatterOwnGroups
57 |
58 |
59 | true
60 | ConvertLeads
61 |
62 |
63 | true
64 | CreateCustomizeFilters
65 |
66 |
67 | true
68 | CreateCustomizeReports
69 |
70 |
71 | true
72 | CreateTopics
73 |
74 |
75 | true
76 | DistributeFromPersWksp
77 |
78 |
79 | true
80 | EditEvent
81 |
82 |
83 | true
84 | EditOppLineItemUnitPrice
85 |
86 |
87 | true
88 | EditTask
89 |
90 |
91 | true
92 | EditTopics
93 |
94 |
95 | true
96 | EmailMass
97 |
98 |
99 | true
100 | EmailSingle
101 |
102 |
103 | true
104 | EnableNotifications
105 |
106 |
107 | true
108 | ExportReport
109 |
110 |
111 | true
112 | ImportPersonal
113 |
114 |
115 | true
116 | LightningConsoleAllowedForUser
117 |
118 |
119 | true
120 | ListEmailSend
121 |
122 |
123 | true
124 | ManageEncryptionKeys
125 |
126 |
127 | true
128 | RunReports
129 |
130 |
131 | true
132 | SelectFilesFromSalesforce
133 |
134 |
135 | true
136 | SendSitRequests
137 |
138 |
139 | true
140 | ShowCompanyNameAsUserBadge
141 |
142 |
143 | true
144 | SubmitMacrosAllowed
145 |
146 |
147 | true
148 | SubscribeToLightningReports
149 |
150 |
151 | true
152 | UseWebLink
153 |
154 |
155 | true
156 | ViewEventLogFiles
157 |
158 |
159 | true
160 | ViewHelpLink
161 |
162 |
163 | true
164 | ViewSetup
165 |
166 |
167 |
--------------------------------------------------------------------------------
/force-app/main/default/profiles/Custom%3A Sales Profile.profile-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Continuation
5 | false
6 | false
7 |
8 |
9 | ContinuationController
10 | false
11 |
12 |
13 | SimpleContinuationController
14 | false
15 |
16 | true
17 |
18 | ContinuationProxy
19 | false
20 |
21 |
22 | SimpleContinuation
23 | false
24 |
25 |
26 | Continuation_Examples
27 | DefaultOn
28 |
29 | Salesforce
30 |
31 | true
32 | AllowViewKnowledge
33 |
34 |
35 | true
36 | ApiEnabled
37 |
38 |
39 | true
40 | AssignTopics
41 |
42 |
43 | true
44 | ChatterForSharePoint
45 |
46 |
47 | true
48 | ChatterInternalUser
49 |
50 |
51 | true
52 | ChatterInviteExternalUsers
53 |
54 |
55 | true
56 | ChatterOwnGroups
57 |
58 |
59 | true
60 | ConvertLeads
61 |
62 |
63 | true
64 | CreateCustomizeFilters
65 |
66 |
67 | true
68 | CreateCustomizeReports
69 |
70 |
71 | true
72 | CreateTopics
73 |
74 |
75 | true
76 | DistributeFromPersWksp
77 |
78 |
79 | true
80 | EditEvent
81 |
82 |
83 | true
84 | EditOppLineItemUnitPrice
85 |
86 |
87 | true
88 | EditTask
89 |
90 |
91 | true
92 | EditTopics
93 |
94 |
95 | true
96 | EmailMass
97 |
98 |
99 | true
100 | EmailSingle
101 |
102 |
103 | true
104 | EnableNotifications
105 |
106 |
107 | true
108 | ExportReport
109 |
110 |
111 | true
112 | ImportPersonal
113 |
114 |
115 | true
116 | LightningConsoleAllowedForUser
117 |
118 |
119 | true
120 | ListEmailSend
121 |
122 |
123 | true
124 | ManageEncryptionKeys
125 |
126 |
127 | true
128 | RunReports
129 |
130 |
131 | true
132 | SelectFilesFromSalesforce
133 |
134 |
135 | true
136 | SendSitRequests
137 |
138 |
139 | true
140 | ShowCompanyNameAsUserBadge
141 |
142 |
143 | true
144 | SubmitMacrosAllowed
145 |
146 |
147 | true
148 | SubscribeToLightningReports
149 |
150 |
151 | true
152 | UseWebLink
153 |
154 |
155 | true
156 | ViewEventLogFiles
157 |
158 |
159 | true
160 | ViewHelpLink
161 |
162 |
163 | true
164 | ViewSetup
165 |
166 |
167 |
--------------------------------------------------------------------------------
/force-app/main/default/profiles/Custom%3A Support Profile.profile-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Continuation
5 | false
6 | false
7 |
8 |
9 | ContinuationController
10 | false
11 |
12 |
13 | SimpleContinuationController
14 | false
15 |
16 | true
17 |
18 | ContinuationProxy
19 | false
20 |
21 |
22 | SimpleContinuation
23 | false
24 |
25 |
26 | Continuation_Examples
27 | DefaultOn
28 |
29 | Salesforce
30 |
31 | true
32 | AllowViewKnowledge
33 |
34 |
35 | true
36 | ApiEnabled
37 |
38 |
39 | true
40 | AssignTopics
41 |
42 |
43 | true
44 | ChatterForSharePoint
45 |
46 |
47 | true
48 | ChatterInternalUser
49 |
50 |
51 | true
52 | ChatterInviteExternalUsers
53 |
54 |
55 | true
56 | ChatterOwnGroups
57 |
58 |
59 | true
60 | ConvertLeads
61 |
62 |
63 | true
64 | CreateCustomizeFilters
65 |
66 |
67 | true
68 | CreateCustomizeReports
69 |
70 |
71 | true
72 | CreateTopics
73 |
74 |
75 | true
76 | DistributeFromPersWksp
77 |
78 |
79 | true
80 | EditEvent
81 |
82 |
83 | true
84 | EditOppLineItemUnitPrice
85 |
86 |
87 | true
88 | EditTask
89 |
90 |
91 | true
92 | EditTopics
93 |
94 |
95 | true
96 | EmailMass
97 |
98 |
99 | true
100 | EmailSingle
101 |
102 |
103 | true
104 | EnableNotifications
105 |
106 |
107 | true
108 | ExportReport
109 |
110 |
111 | true
112 | ImportPersonal
113 |
114 |
115 | true
116 | LightningConsoleAllowedForUser
117 |
118 |
119 | true
120 | ListEmailSend
121 |
122 |
123 | true
124 | ManageCases
125 |
126 |
127 | true
128 | ManageEncryptionKeys
129 |
130 |
131 | true
132 | ManageSolutions
133 |
134 |
135 | true
136 | RunReports
137 |
138 |
139 | true
140 | SelectFilesFromSalesforce
141 |
142 |
143 | true
144 | SendSitRequests
145 |
146 |
147 | true
148 | ShowCompanyNameAsUserBadge
149 |
150 |
151 | true
152 | SubmitMacrosAllowed
153 |
154 |
155 | true
156 | SubscribeToLightningReports
157 |
158 |
159 | true
160 | TransferAnyCase
161 |
162 |
163 | true
164 | UseWebLink
165 |
166 |
167 | true
168 | ViewEventLogFiles
169 |
170 |
171 | true
172 | ViewHelpLink
173 |
174 |
175 | true
176 | ViewSetup
177 |
178 |
179 |
--------------------------------------------------------------------------------
/force-app/main/default/remoteSiteSettings/LongRunningService.remoteSite-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | true
5 | https://long-running.herokuapp.com
6 |
7 |
--------------------------------------------------------------------------------
/force-app/main/default/tabs/Continuation.tab-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Created by Lightning App Builder
4 | Continuation
5 |
6 | true
7 | Custom36: Train
8 |
9 |
--------------------------------------------------------------------------------
/force-app/main/default/tabs/Continuation_Examples.tab-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Created by Lightning App Builder
4 | Continuation_Examples
5 |
6 | true
7 | Custom25: Alarm clock
8 |
9 |
--------------------------------------------------------------------------------
/sfdx-project.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageDirectories": [
3 | {
4 | "path": "force-app",
5 | "default": true
6 | }
7 | ],
8 | "namespace": "",
9 | "sfdcLoginUrl": "https://login.salesforce.com",
10 | "sourceApiVersion": "40.0"
11 | }
12 |
--------------------------------------------------------------------------------