Hello Amosbatto,
I tried this your way but I Coudnt go past the field after creating it in the users.js. Thinking where I was wrong and All I wanted was to enter the employee number to the field. Since we already have to access of USR_ID from the database in
Code: Select allvar data = Ext.util.JSON.decode(r.responseText);
usertmp = data.user;
in workflow/engine/templates/users/users.js and that I need to alter this number. So here is all that I changed in the users.js file to get the results.
Code: Select all{
id : 'USR_ID',
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('Employee #')) +'"> * </span>' + _('Employee #'),
xtype : 'textfield',
width : 260,
allowBlank : false
},
in the var informationFields
Code: Select allExt.getCmp("frmDetails").getForm().setValues({
USR_FIRSTNAME: data.user.USR_FIRSTNAME,
USR_LASTNAME: data.user.USR_LASTNAME,
USR_USERNAME: data.user.USR_USERNAME,
USR_EMAIL: data.user.USR_EMAIL,
USR_ADDRESS: data.user.USR_ADDRESS,
USR_ZIP_CODE: data.user.USR_ZIP_CODE,
USR_ID:data.user.USR_ID,
USR_PHONE: data.user.USR_PHONE,
USR_POSITION: data.user.USR_POSITION,
USR_DUE_DATE: data.user.USR_DUE_DATE,
USR_STATUS: data.user.USR_STATUS,
/*----------------------------------********---------------------------------*/
USR_LOGGED_NEXT_TIME: data.user.USR_LOGGED_NEXT_TIME
});
in the loadUserData function
Code: Select allExt.getCmp("USR_ID2").setText(data.user.USR_ID);
in if (infoMode) in the loadUserData function.
End result is we have a new field Employee # in the user form. Where we can see the USR_ID and change this number. The only issue I see is that when we try to save new user with an existing USR_ID number, it does not save as there is error but the client does not see it.
Please let me know if you think there is a major issues you find with this method. Thank you so much for your help.