Created
March 16, 2020 04:22
-
-
Save mrbarletta/03cbf2eb20226a32efa2dbed02d7e597 to your computer and use it in GitHub Desktop.
Mass update SuiteCRM roles using JS - adjust the value, paste on console and Save
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
let a= $("[id^=ACLEditView_Access] [id$=delete]").each(function(i, item){ | |
let el = $(item).find('select') | |
if(el.length>0){ | |
$("#"+$(el).attr('id')+" option[value='80']").prop('selected',true) // 80 means GROUP | |
} | |
}) | |
let a= $("[id^=ACLEditView_Access] [id$=edit]").each(function(i, item){ | |
let el = $(item).find('select') | |
if(el.length>0){ | |
$("#"+$(el).attr('id')+" option[value='80']").prop('selected',true) // 80 means GROUP | |
} | |
}) | |
let a= $("[id^=ACLEditView_Access] [id$=list]").each(function(i, item){ | |
let el = $(item).find('select') | |
if(el.length>0){ | |
$("#"+$(el).attr('id')+" option[value='80']").prop('selected',true) // 80 means GROUP | |
} | |
}) | |
let a= $("[id^=ACLEditView_Access] [id$=view]").each(function(i, item){ | |
let el = $(item).find('select') | |
if(el.length>0){ | |
$("#"+$(el).attr('id')+" option[value='80']").prop('selected',true) // 80 means GROUP | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment