Skip to content

Instantly share code, notes, and snippets.

View ViktorMants's full-sized avatar
♾️

Viktor ViktorMants

♾️
View GitHub Profile
@ViktorMants
ViktorMants / gist:a2512f4411725c53f183cf53ec778ce8
Created September 16, 2020 09:48
Content Document Statistica
var userIds = []
var queryUsersCallBack = (res) => {
console.log(res.records.length)
console.log(res.done)
console.log(res.queryLocator)
for (let user of res.records) {
userIds.push(user.Id)
}
if (res.done != 'true') {
@ViktorMants
ViktorMants / Script for deleting a large number of entries in the Salesforce
Last active December 10, 2018 20:41
This small hack will allow you to delete a large amount of data just by running it.
//guide:
//1) login to salesforce
//2) open dev tools console
//3) execute "pre-start script" in dev tools console
//4) in "useful script" replace ObjectApiName to your object name
//5) execute "useful script" in dev tools console
//pre-start script
document.write('<script src="/soap/ajax/44.0/connection.js" type="text/javascript"></script><script src="/soap/ajax/44.0/apex.js" type="text/javascript"></script>')
var __sfdcSessionId = document.cookie.split('; ').find((item) => {return item.indexOf('sid=') == 0}).substring(4)
.main-message {
text-align: center;
}
.main-message img {
margin: 50px 0 0;
width: 150px;
}
.main-message h1 {