Skip to content

Instantly share code, notes, and snippets.

public class CalloutClass {
public static HttpResponse getInfoFromExternalService() {
HttpRequest req = new HttpRequest();
req.setEndpoint('http://api.salesforce.com/foo/bar');
req.setMethod('GET');
Http h = new Http();
HttpResponse res = h.send(req);
return res;
}
@sf-wilson
sf-wilson / JsonReader.cls
Created April 6, 2021 10:15 — forked from gbutt/JsonReader.cls
JsonReader
public class JsonReader {
public Map<String, Object> jsonMap {get; set;}
public JsonReader(Map<String, Object> jsonMap) {
this.jsonMap = jsonMap;
}
public String getString(String path) {
return (String)getFieldAtPath(path);
}
@sf-wilson
sf-wilson / callcenter.xml
Created March 29, 2021 09:28 — forked from tylerlong/callcenter.xml
Salesforce Open CTI RingCentral integration
<callCenter>
<section sortOrder="0" name="reqGeneralInfo" label="General Information">
<item sortOrder="0" name="reqInternalName" label="Internal Name">RingCentralAdapterOpenCTI</item>
<item sortOrder="1" name="reqDisplayName" label="Display Name">RingCentral Call Center Adapter Open CTI</item>
<item sortOrder="2" name="reqAdapterUrl" label="CTI Adapter URL">/apex/RCPhone</item>
<item sortOrder="3" name="reqUseApi" label="Use CTI API">true</item>
<item sortOrder="4" name="reqSoftphoneHeight" label="Softphone Height">550</item>
<item sortOrder="5" name="reqSoftphoneWidth" label="Softphone Width">300</item>
<item sortOrder="6" name="reqSalesforceCompatibilityMode" label="Salesforce Compatibility Mode">Lightning</item>
</section>
# Here there are some examples of git commands that I use often.
# Not all commands written here are git commands, but all of them are related to git. Please refer to the documentation for more details.
# Set your details
git config --global user.name "John Doe"
git config --global user.email "john@example.com"
# Use --global to set the configuration for all projects. If git config is used without --global and run inside a project directory, the settings are set for the specific project.
# Make git ignore file modes
@sf-wilson
sf-wilson / sfdx commands list
Created November 23, 2020 03:51 — forked from saicharanreddyk/sfdx commands list
sfdx commands list
C:\Users\Saicharan Reddy K>sfdx force:doc:commands:list
WARNING: The command "DocListCommand" has been deprecated and will be removed in v49.0 or later. Use "sfdx commands" instead.
=== Commands
force:alias:list # list username aliases for the Salesforce CLI
force:alias:set # set username aliases for the Salesforce CLI
force:analytics:template:create # add an Analytics template to your workspace
force:apex:class:create # create an Apex class
force:apex:execute # execute anonymous Apex code
force:apex:log:get # fetch the last debug log
force:apex:log:list # list debug logs
@sf-wilson
sf-wilson / sfdx-cheatsheet.sh
Last active March 14, 2024 09:51 — forked from jsmithdev/sfdx-cheatsheet.sh
Salesforce SFDX Cheat Sheet
# This cheatsheet contains the most often used SFDX commands for beginners to get a jumpstart.
# Hint. it is highly recommended to use `-h` to check the usage of any SFDX commands and corresponding parameters.
# For instance, use `sfdx force:auth:web:login -h` to checke what `-d` `-a` parameters do
# List down all supported dx commands:
sfdx force:doc:commands:list
# List org web / jwt auth method
sfdx auth:list
@sf-wilson
sf-wilson / sfdx-cheatsheet.sh
Created July 30, 2020 04:03 — forked from xixiaofinland/sfdx-cheatsheet.sh
Salesforce SFDX Cheat Sheet
# Proudly supplied by Salesforce Way Site: https://salesforceway.com
# This cheatsheet contains the most often used SFDX commands for beginners to get a jumpstart.
# Hint. it is highly recommended to use `-h` to check the usage of any SFDX commands and corresponding parameters.
# For instance, use `sfdx force:auth:web:login -h` to checke what `-d` `-a` parameters do
# List down all supported dx commands:
sfdx force:doc:commands:list
# Check current DebHub and Scratch Org status
sfdx force:org:list