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
| <template> | |
| <!-- https://github.com/pozil/sfdc-ui-lookup-lwc --> | |
| <c-lookup | |
| lwc:ref="sobjLookup" | |
| label="sObject Lookup" | |
| onsearch={handleLookupSearch} | |
| onselectionchange={handleLookupSelectionChange} | |
| ></c-lookup> | |
| </template> |
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
| OauthToken[] oaList = [ | |
| SELECT | |
| LastUsedDate,AppMenuItemId,AppName,User.Profile.Name,User.ProfileId | |
| FROM OauthToken | |
| WHERE User.IsActive = true | |
| /*Put additional filter based on whatever criteria your org seems sufficient*/ | |
| ORDER BY AppName | |
| ]; | |
| Set<Id> profileIds = new Set<Id>(); |
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
| //Original code from Stackoverflow | |
| // https://stackoverflow.com/questions/70470728/how-can-i-execute-some-async-tasks-in-parallel-with-limit-in-generator-function/77021751#77021751 | |
| const mapParallel = async (values, fn) => { | |
| const promises = new Set(); //Complete result set after all executions are complete | |
| const tmpPromises = new Set(); //Container array to only allow 5 Pending promises at a time | |
| const MAX_APEX_CALLS = 5; | |
| for (const i in values) { | |
| //if the size of our temp array is greater than or equal the max number of calls | |
| //we need to wait for one of them to finish before adding another one |
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
| import { LightningElement, wire, api } from "lwc"; | |
| //1. import the methods getRecord | |
| import { getRecord } from "lightning/uiRecordApi"; | |
| //2. Import reference to the object and the fields | |
| import NAME_FIELD from "@salesforce/schema/Account.Name"; | |
| import RATING_FIELD from "@salesforce/schema/Account.Rating"; | |
| import INDUSTRY_FIELD from "@salesforce/schema/Account.Industry"; |
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
| using System.Net; | |
| using System.Text; | |
| namespace csharp | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| HttpListener server = new HttpListener(); |
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
| // ==UserScript== | |
| // @name GitHub Auto SSO | |
| // @namespace http://pozil.github.io | |
| // @version 1.0 | |
| // @description Adds a button that lets you automatically signs-in to all orgs that requires SSO login (instead of clicking 3x per org) | |
| // @author pozil | |
| // @match https://github.com/* | |
| // ==/UserScript== | |
| (function() { |