Skip to content

Instantly share code, notes, and snippets.

@HemantShukla
Last active April 12, 2017 09:08
Show Gist options
  • Save HemantShukla/1c4749d097d8b171fdb74e374bfc54b1 to your computer and use it in GitHub Desktop.
Save HemantShukla/1c4749d097d8b171fdb74e374bfc54b1 to your computer and use it in GitHub Desktop.
/**
These scripts will only work in Salesforce classic.
**/
//For Edit access column
var arrayEdit = document.getElementsByClassName('displayedCol');
for(i=0;i<arrayEdit.length;i++){
if(arrayEdit[i]['firstElementChild']!= undefined)
arrayEdit[i]['firstElementChild'].checked = true;
}
//-------------------------------------
//For Read access column
var arrayRead = document.getElementsByClassName('readonlyCol');
for(i=0;i<arrayRead.length;i++){
if(arrayRead[i]['firstElementChild']!= undefined)
arrayRead[i]['firstElementChild'].checked = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment