Page 1 of 1

Add button to Globeadmin Home

Posted: Tue Nov 30, 2021 10:38 am
by marcus
Hello, I want to add additional buttons on the Globeadmin Home. I have multiple accesslevels with different homescreens and I want to be able to access all of them by the klick of a button. My current workaround are some procedures that open the appropriate lauch form.
Best Regards
marcus

Re: Add button to Globeadmin Home

Posted: Tue Nov 30, 2021 11:04 am
by kev1n
To add buttons on nuhome (globeadmin launch form), you can to add this JS under Setup -> Header.
Replace 5ac14228beed98e with the launch form ids. (Press CTRL+SHIFT+I on a launch form to retrieve the Form Id)

Code: Select all

function addAccessLevelButton(obj, number, y, label, id) {

    $('#' + obj).clone()
        .prop("id", "access_level" + number)
        .insertAfter('#object_button')
		.attr('onclick', "nuStopClick(event);nuForm('" + id + "','','','','0')")
        .css({
            position: 'absolute',
            top: y,
            left: 53
        }).
		html(label);
		
		
}

function nuOnLoad() {
 
 if(nuFormType() == 'edit'){

		if (nuCurrentProperties().form_id == 'nuhome') {
			addAccessLevelButton('object_button', 1, 230, 'Access Level 1','5ac14228beed98e');
			addAccessLevelButton('object_button', 2, 286, 'Access Level 2','5ac14228beed98e');
			addAccessLevelButton('object_button', 3, 342, 'Access Level 3','5ac14228beed98e');
			addAccessLevelButton('object_button', 4, 398, 'Access Level 4','5ac14228beed98e');
		}
     
 } else
 if(nuFormType() == 'browse'){
     // Browse Form loaded
 }
 
} 

Re: Add button to Globeadmin Home

Posted: Wed Dec 01, 2021 4:31 pm
by marcus
Thank you kev1n! It works perfectly