OAuth 2.0 Web Server Flow to integrate two salesforce orgs
Sfdc-lightning | A Blog On Salesforce
by
3d ago
This flow is used to integrate an external web app with the Salesforce API, it implements the OAuth 2.0 authorization code grant type. With this flow, the server hosting the web app must be able to protect the connected app’s identity, defined by the client ID and client secret. Throughout this topic, we'll dive into the key concepts of the Web Server Flow,  and provide a step-by-step guide on how to implement it between two Salesforce orgs say ORG A and ORG B. By the end of this session, you'll have a clear understanding of how to leverage the Web Server Flow to create robust integration ..read more
Visit website
Explain Javascript Async/Await?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
"async and await make promises easier to write". async makes a function return a Promise while await makes a function wait for a Promise Async Syntax: The keyword async before a function makes the function return a promise: Example: async function myFunction() {   return "Hello"; } The above is the same as below: function myFunction() {   return Promise.resolve("Hello"); } Await Syntax: The await keyword can only be used inside an async function. The await keyword makes the function pause the execution and wait for a resolved promise before it continues: let value = await promise; Le ..read more
Visit website
Explain JavaScript Promise Object?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
As we have seen earlier, With asynchronous programming, JavaScript programs can start long-running tasks, and continue running other tasks in parallel. But, asynchronus programmes are difficult to write and difficult to debug. Because of this, most modern asynchronous JavaScript methods don't use callbacks. Instead, in JavaScript, asynchronous programming is solved using Promises instead. A Promise contains both the producing code and calls to the consuming code: Promise Syntax: let myPromise = new Promise(function(myResolve, myReject) { // "Producing Code" (May take some time)   myResolv ..read more
Visit website
What are classes in Javascript and explain Inheritance?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
A JavaScript class is not an object. It is a template for JavaScript objects. Use the keyword class to create a class.  Always add a method named constructor(). class Employee {   constructor(name, department) {     this.name = name;     this.department = department;   } } The example above creates a class named "Employee". The class has two initial properties: "name" and "department". The example below uses the Employee class to create a Employee object. const myEmp = new Employee("Farukh", IT); The constructor method is called automatically when a new objec ..read more
Visit website
Explain JavaScript Callbacks?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
 A callback is a function passed as an argument to another function. In the below example, we can see we are passing displayValue function as an argument to doSum function while calling doSum function. doSum(2, 3, displayValue); function displayValue(sum) {   console.log('callback function called');   console.log('Sum is '+sum); } function doSum(num1, num2, sampleCallbackDemonstration) {   let sum = num1 + num2;   sampleCallbackDemonstration(sum); } Output: callback function called Sum is 5 Note: When you pass a function as an argument, remember not to use parenthesis ..read more
Visit website
What is Javascript Object and Object Methods?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
Javascript Object: As we have already learned that JavaScript variables are containers for data values. The below code assigns a simple value (Mumbai) to a variable named text: let text="Mumbai"; Objects are variables too. But objects can contain many values. The below code assigns many values (Mumbai, Maharashtra, India) to a variable named text: const text = {name:"Mumbai", state:"Maharashtra", country:"India"}; a) object are used to store collections of data and more complex entities. b) objects can be created using {...} with optional list of properties, a property is "key": "value" pair ..read more
Visit website
What are basic string methods in Javascript?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
 Below are string methods in Javascript. They produces a new string without altering the original string. String length String charAt() String charCodeAt() String at() String [ ] String slice() String substring() String substr() String toUpperCase() String toLowerCase() String concat() String trim() String trimStart() String trimEnd() String padStart() String padEnd() String repeat() String replace() String replaceAll() String split() Let us explore some methods with an example. JavaScript String Length: The length property returns the length of a string. let text = "Farukh"; console.log ..read more
Visit website
What are operators in Javascript?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
 Javascript operators are used to perform different types of mathematical and logical computations. Sample example to demontrate addition, substraction, division: let x = 5; let y = 2; let a = x + y; let b = x - y; let c = x / y; console.log(a); console.log(b); console.log(c); Output: 7 3 2.5 JavaScript Assignment Operators: The Addition Assignment Operator (+=) adds a value to a variable. Similarly, you can use the other operators as shown below. let x = 10; x += 5; console.log(x); Output: 15 The += assignment operator can also be used to add (concatenate) strings: let text1 = "My Name i ..read more
Visit website
What are Sets in Javascript?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
A JavaScript Set is a collection of unique values of any data type. How to Create a Set? You can create a JavaScript Set by: 1) Passing an Array to new Set() Ex: const fruits = new Set(["apple","orange","mango"]); 2) Create a new Set and use add() to add values Ex: const fruits = new Set(); fruits.add("apple"); fruits.add("orange"); fruits.add("mango"); 3) Create a new Set and use add() to add variables Ex: const fruits = new Set(); const a = "apple"; const b = "orange"; const c = "mango"; fruits.add(a); fruits.add(b); fruits.add(c); What are avaialble Set methods? new Set(): Creates a new Set ..read more
Visit website
What are Maps in Javascript?
Sfdc-lightning | A Blog On Salesforce
by
3w ago
A Map in Javascript holds key-value pairs where the keys can be any datatype. How to Create a Map? We can create a map as shown below. a) By passing an Array to new Map() const cities = new Map([   ["Nagpur", "Nag"],   ["Mumbai", "Mum"],   ["Delhi", "Del"] ]); b) Create a Map and use Map.set() const cities = new Map(); cities.set("Nagpur", "Nag"); cities.set("Mumbai", "Mum"); cities.set("Delhi", "Del"); What are avaialble Map methods? 1) new Map() : Creates a new Map object 2) set() : Sets the value for a key in a Map ex: cities.set("Kolkata", Kol); 3) get() : Gets the value for ..read more
Visit website

Follow Sfdc-lightning | A Blog On Salesforce on FeedSpot

Continue with Google
Continue with Apple
OR