This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unique name for this workflow | |
name: Salesforce CI | |
# Definition when the workflow should run | |
on: | |
push: | |
branches: | |
- '*' | |
# Jobs to be executed | |
jobs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { App, LogLevel, ExpressReceiver } = require('@slack/bolt'); | |
const jsforce = require('jsforce'); //jsforce open source library to connect to Salesforce | |
// Create Salesforce Connection | |
const oauth2 = new jsforce.OAuth2({ | |
// you can change loginUrl to connect to sandbox or prerelease env. | |
// loginUrl : 'https://test.salesforce.com', | |
clientId: process.env.SALESFORCE_CLIENT_ID, | |
clientSecret: process.env.SALESFORCE_CLIENT_SECRET, | |
redirectUri: 'https://94d7e0bbbc0e.ngrok.io/salesforce/oauth_redirect' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "SFDX: Tail Logs", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"force:apex:log:tail", | |
"-c", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "SFDX: Retrieve Metadata From Package", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"force:source:retrieve", | |
"-n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "SFDX: Run Security Scan on Current File", | |
"type": "shell", | |
"command": "sfdx", | |
"args": [ | |
"scanner:run", | |
"-t", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a salesforce functions | |
$ sfdx evergreen:function:init <MyFunction> -l typescript -m force-app/main/default | |
// Start a function | |
$ cd functions/MyFunction | |
$ sfdx evergreen:function:start --verbose | |
// $ sfdx evergreen:function:invoke \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<types> | |
<members>*</members> | |
<name>ActionLinkGroupTemplate</name> | |
</types> | |
<types> | |
<members>*</members> | |
<name>ApexClass</name> | |
</types> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Metadata": { | |
"actionCalls": [{ | |
"actionName": "emailSimple", | |
"actionType": "emailSimple", | |
"connector": null, | |
"dataTypeMappings": [], | |
"description": null, | |
"faultConnector": null, | |
"inputParameters": [{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"size" : 1, | |
"totalSize" : 1, | |
"done" : true, | |
"queryLocator" : null, | |
"entityTypeName" : "Flow", | |
"records" : [ { | |
"attributes" : { | |
"type" : "Flow", | |
"url" : "/services/data/v49.0/tooling/sobjects/Flow/301B00000006sh9IAA" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<PlatformEvents__e > events = new List<PlatformEvents__e >(); | |
// Created a PlatformEvents with a Message__c field of 30 characters only, so second event fails | |
events.add(new PlatformEvents__e(Message__c='Test')); | |
events.add(new PlatformEvents__e(Message__c='ldjgkfjgkfjkjhkgjhkgjhkghkghkgkhkghkghkghkghkghghkghkghkghkghghkghkghkghkghghkghkghkghkghghkghkghkghkghghkghkghkghkgh')); | |
Savepoint sp = Database.setSavepoint(); | |
// Call method to publish events | |
List<Database.SaveResult> results = EventBus.publish(events); |