Forum Post: RE: Is it possible to add a button that calls the function that resets an...

  • Thread starter Thread starter Orchid Corpin
  • Start date Start date
Status
Not open for further replies.
O

Orchid Corpin

Guest
Currently there is no functionality for this aside from view page, but you can utilize this workaround. NOTE: Steps below is a workaround, it was tested and works fine since no hard-coded IDs. Still I suggest to file an enhancement for this. 1. Create a button first Go to object definition of USER object and create New Button under Button section 2. In New button page specify "Run client-side JavaScript" as the behavior and in the textarea specify the code below. Below section you select the "Personal Setup" or select other pages too. NOTE: once saved you cannot edit in which page it will be displayed. rbf_runObjectAction('rbf_userReset'); 3. In the Personal Setup page add a script component and paste the code below. If button was added to the edit page you specify this code too. script type="text/javascript" function rbf_userResetConfirmed() { window.location.href = '../servlet/Object?act=resetPassword&id={!id}&objDefId={!#OBJ_ID.USER}&destId={!name#url}'; } function rbf_userReset() { var dt = 'Reset Password?'; var dc = ' span class="bold" Are you sure you want to reset the password for {!firstName} {!lastname}? /span br/ br/ span class="bold" Note: /span An email will be sent to this user containing a new temporary password (this email is based on the i Password Reset Notification /i User Email Template which can be customized).';showPopWin('../dialog/confirmCheckDialog.jsp', 500, 290, rbf_userResetConfirmed, true, dc, dt);} rbf_addObjectAction('rbf_userReset', rbf_userReset); /script Hope this may help. Regards, Orchid

Continue reading...
 
Status
Not open for further replies.
Back
Top