Skip to content

Instantly share code, notes, and snippets.

View rahulmalhotra's full-sized avatar
😃
Working on something amazing...!!

Rahul Malhotra rahulmalhotra

😃
Working on something amazing...!!
View GitHub Profile
@rahulmalhotra
rahulmalhotra / Clone Lightning Container Boilerplate
Created August 11, 2018 07:04
Command to clone Lightning Container Boilerplate repository used in SFDC Stop blog post
git clone https://github.com/rahulmalhotra/lightning-container-boilerplate
@rahulmalhotra
rahulmalhotra / create-react-app
Created August 11, 2018 11:31
gist to create a new react app used in SFDC Stop tutorial
npm install -g create-react-app
@rahulmalhotra
rahulmalhotra / apex.json
Created August 26, 2018 05:23
JSON to append
"landing-pages": [
{
"path": "index.html",
"apex-controller": "LightningContainerBoilerplate"
}
]
@rahulmalhotra
rahulmalhotra / IndiaDreamin 2018
Created November 26, 2018 23:55
Test gist for India Dreamin 2018
Hello Trailblazers..!!
@rahulmalhotra
rahulmalhotra / Custom Authentication Provider Sample Code.cls
Created December 22, 2018 08:10
This gist is used in Custom Authentication Provider blog for session at India Dreamin 2018.
try {
Http http = new Http();
HttpRequest req1 = new HttpRequest();
req1.setEndpoint('callout:GithubAPI/gists/66508cf3e51801c01994ce2cbf2e5dde/comments');
req1.setMethod('POST');
Map<String, String> bodyMap = new Map<String, String>();
bodyMap.put('body', 'Welcome to India Dreamin Session Blog');
req1.setBody(JSON.serialize(bodyMap));
HttpResponse res;
res = http.send(req1);
@rahulmalhotra
rahulmalhotra / SFDCStopBlogsAPIResponse.json
Last active December 3, 2019 08:43
This gist is used in the 8th Tutorial of SFDC Stop Integration Tutorial Series showcasing the response JSON. The actual API is available at:- https://sfdcstop.herokuapp.com/blogs
{
"author": "Rahul Malhotra",
"blogs": [
{
"id": "1",
"title": "Salesforce Integration Tutorial Part1 - Introduction and Setting up Workbench",
"url": "https://www.sfdcstop.com/2019/11/salesforce-integration-tutorial-part-1.html"
},
{
"id": "2",
@rahulmalhotra
rahulmalhotra / SalesforceConnect.cls
Created December 4, 2019 04:46
Gist to connect to a salesforce org in apex and query list of contacts. Used in describing HTTPCalloutFramework usage on SFDCStop
public class TokenResponseWrapper {
public String access_token;
public String instance_url;
public String id;
public String token_type;
public String issued_at;
public String signature;
}
HTTPRequest tokenRequest = new HTTPRequest();
@rahulmalhotra
rahulmalhotra / SalesforceConnectWithHTTPCalloutFramework.cls
Created December 4, 2019 04:57
Gist to connect to a salesforce org in apex and query list of contacts using HTTPCalloutFramework. Used in describing HTTPCalloutFramework usage on SFDCStop
public class TokenResponseWrapper {
public String access_token;
public String instance_url;
public String id;
public String token_type;
public String issued_at;
public String signature;
}
HttpCalloutService service = new HTTPCalloutService('PlayfulBearOrg');
@rahulmalhotra
rahulmalhotra / SalesforceConnectWithHTTPCalloutFrameworkAndNamedCredentials.cls
Created December 4, 2019 05:51
Gist to connect to a salesforce org in apex and query list of contacts using HTTPCalloutFramework and named credentials. Used in describing HTTPCalloutFramework usage on SFDCStop
HttpCalloutService service1 = new HTTPCalloutService('PlayfulBearQueryAPIWithNamedCredentials');
String url = service1.getEndpointURL() + 'SELECT+id,name+from+contact';
service1.setEndpointURL(url);
System.debug(service1.sendRequest().getBody());
@rahulmalhotra
rahulmalhotra / calculator.xml
Created January 4, 2020 11:46
WSDL File for SOAP API Tutorial in Salesforce Integration Tutorial Series of SFDCStop
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="Add">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="intA" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="intB" type="s:int" />
</s:sequence>