JavaScript - Extending SAM Account Administration

From All n One's bxp software Wixi

Jump to: navigation, search

1 Overview

Within bxp software (bxp) in the System Access Management module it is possible to add, edit, copy and retire users. This process provides very strong access controls for security and system management.

As every bxp client can have their own custom requirements for the user management process, we have provided a mechanism for extending the user interface to provide further validation and customisation.

There are three primary interface areas:

  • Request Main Menu > System Access Management > User Setup Requests > Request New User >
  • Add Main Menu > System Access Management > User Administration > Add User - Security Details Only >
  • Edit Main Menu > System Access Management > Edit User - Security Details > Lookup the user > Select the user >

The copy function is considered part of the "Add" process.

The engine allows custom JavaScript code to be appended directly into the page through

2 Usage

Main Menu > System Access Management > System Management > System Settings > Security JavaScript >

JavaScript custom to the type of function can be added in the relevant box.

Use of the "General Security Library" box allows JavaScript common to all three to be added.

3 Worked Example 1 - Default settings

You may wish to set a number of defaults to speed up entry, or even build these defaults into buttons. This example creates two buttons at the top of the page and sets some defaults.

Main Menu > System Access Management > System Management > System Settings > Security JavaScript > Add User JavaScript >

function fn_CustomSecurity1(){

	//Setting default values
	var objStaffId = document.getElementById('strClient_CompanyStaffIdNumber');
	objStaffId.value = 'XXX123';

	//Turning on modules
	if (document.getElementById('27')){
	//Turning on functions
	if (document.getElementById('2710')){
function fn_CustomSecurity2(){
	alert('Function 2');

var objHeader = document.getElementById('lblUser_UserDetails');

objHeader.innerHTML = objHeader.innerHTML + '<br />';
objHeader.innerHTML = objHeader.innerHTML + '<input type="button" name="btnCustom1" id="btnCustom1" class="cssMaster_Button" style="width:200px;" value="Custom 1" onclick="fn_CustomSecurity1();" />';
objHeader.innerHTML = objHeader.innerHTML + '<input type="button" name="btnCustom2" id="btnCustom2" class="cssMaster_Button" style="width:200px;" value="Custom 2" onclick="fn_CustomSecurity2();" />';

4 Worked Example 2 - Reminders

A very simple reminder when the user logs into the page can be presented

alert('Please ensure that the Staff Id is set correctly.');

if (document.getElementById('strClient_CompanyStaffIdNumber')){