- Create a new Sheet (or use an existing one)
- Tools -> Script Editor
- Copy + Paste the attached
.js
code snippet (Save) - Back on the sheet, paste in
=FetchAccounts("up:yeah:THE_REST_OF_YOUR_TOKEN_HERE", 0)
- Profit
Don't have an API token, get one here.
// Query list of Accounts | |
List<Account> accounts = [ | |
SELECT | |
Id, Name | |
FROM | |
Account | |
]; | |
// get Set of Ids of the Object | |
Set<Id> ids = new Set<Id>(new Map<Id, Account>(accounts).keySet()); |
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --allow-running-insecure-content |
let now = new Date() | |
let yr = now.getFullYear() | |
let mth = `${ | |
now.getMonth() + 1 < 10 ? `0${now.getMonth() + 1}` : now.getMonth() + 1 | |
}` | |
let dt = `${date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()}` | |
let hrs = `${ | |
date.getHours() < 10 ? `0${date.getHours()}` : date.getHours() | |
}` | |
let mins = `${ |
[ | |
{ | |
"name": "accessible-icon", | |
"type": "lab", | |
"unicode": "" | |
}, | |
{ | |
"name": "american-sign-language-interpreting", | |
"type": "la", | |
"unicode": "" |
String linkedEntityId = 'a05B000000ACLmYIAX'; | |
List<ContentDocumentLink> cdl = [ | |
SELECT | |
ContentDocument.Id, ContentDocument.Title, ContentDocument.FileType, ContentDocumentId | |
FROM ContentDocumentLink | |
WHERE LinkedEntityId =: linkedEntityId | |
]; | |
ContentDocumentLink cdl1 = cdl[0]; |
.js
code snippet (Save)=FetchAccounts("up:yeah:THE_REST_OF_YOUR_TOKEN_HERE", 0)
Don't have an API token, get one here.
function removeDuplicateObjectsByKey(array, fieldToDuplicateCheck) { | |
const newArray = [] | |
const arrayKeys = [] | |
array.forEach((item) => { | |
// check if we don't already have the value within the arrayKeys array | |
if (!arrayKeys.includes(item[fieldToDuplicateCheck])) { | |
// push this value to the arrayKeys array | |
arrayKeys.push(item[fieldToDuplicateCheck]) | |
// push this object to the newArray array |
/** | |
* @description Inverse the Object keys/values | |
* @param {object} obj | |
*/ | |
export function inverseObjectKeysAndValues(obj: { [key: string]: any }) { | |
return Object.keys(obj).reduce( | |
(acc, curr) => ({ | |
...acc, | |
[obj[curr].toString()]: curr, | |
}), |
{ | |
"search.exclude": { | |
"**/.localdevserver": true, | |
"**/.sfdx": true, | |
"**/node_modules": true, | |
"force-app\\main\\default\\aura": false, | |
"force-app\\main\\default\\classes": false, | |
"force-app\\main\\default\\lwc": false, | |
"force-app\\main\\default\\pages": false, | |
"force-app\\main\\default\\staticresources": true |
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "SFDX: Deploy Current File", | |
"type": "shell", | |
"command": "sf", | |
"args": [ | |
"project", | |
"deploy", |