Deselect all available Zoho Project Users Check Box when creating a new CRM Contact Project
Currently, if you have Zoho Projects linked to Zoho CRM and you go to a Contact and select New Project
You will get to the option to create a new project. The default setting has all Zoho Project users selected, not really an issue unless you have more than 30 or 40 users. Which we do, and to manually go through and deselect all the users that are not required for a particular project is very time consuming.
Fear not, I have a script that has helped my team and thought I would share in hopes that Zoho might add a similar check box to deselect or select all users to the screen option.
Once you select New Project you will see this Create New Project option dialog.
If you notice all users are selected by default, you can use the following javascript in the Console of your browser or use a browser gesture extension to trigger the javascript function. For now that is unless the Zoho team takes up this recommendation.
After running the function it will deselect all project users ( Note Admins will always be added to every project regardless of these checkboxes)
Well here is the magic, hope this helps someone with a large team of Zoho CRM and Zoho Project Users.
- // Written by Thomas Pursifull 5/6/2016
- // Zoho Projects deselect all users function
- // Lets get all the check boxes
- var checkBoxes = document.querySelectorAll("input[type='checkbox']");
- var checkBoxesLength = checkBoxes.length;
- // Set up storage of the length of real project users check boxes
- var userCheckBoxCount = 0;
- // Get the length of the users by looping through all of them and tallying the project user check boxes
- for (i = 0; i < checkBoxesLength ; i++) {
- var projectUsers = document.getElementById('ProjectConfig_createProjectUsers_' + i + '__selected');
- if (projectUsers){
- // Tally we found a Project user check box
- userCheckBoxCount += 1;
- // contains a Project user
- } else {
- // does not contain a project user
- }
- }
- // loop through the Project user check boxes and deselect them
- for (i = 0; i < userCheckBoxCount; i++) {
- document.getElementById('ProjectConfig_createProjectUsers_' + i + '__selected').checked = false;
- }
Cheers!
Thomas Pursifull