Last active
March 3, 2021 18:25
-
-
Save jmdohn/26e8ee112c017bc67c454a67167cb9bd to your computer and use it in GitHub Desktop.
Get Dependent Permissions Salesforce
This file contains 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
var finalArray = []; | |
var arrayPerms = Object.keys(permDependencies); | |
for(var i = 0; i < arrayPerms.length; i++){ | |
var currentPermissionLabel = document.getElementById(arrayPerms[i]).title; | |
var permissionDependent = []; | |
var currentDependency = permDependencies[arrayPerms[i]]; | |
for(var c = 0; c < currentDependency.length; c++){ | |
if(document.getElementById(currentDependency[c]) !== null && document.getElementById(currentDependency[c]).title !== undefined) | |
permissionDependent.push(document.getElementById(currentDependency[c]).title); | |
} | |
finalArray.push({[currentPermissionLabel] : permissionDependent}); | |
} | |
console.log(finalArray); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment