Bulk Updates to Existing Users

Afternoon,

Do you know of a way that we can bulk update a number of existing eB users to change their status from ‘Active’ to ‘Not Active’?

We do not have any provisioning spreadsheets that we believe are capable of doing so.

Kind Regards,

Lewis C

  • Hi Lewis,

    I am not aware to bulk update this information, but it could be done using simple SQL commands if you have the list of users you want to modify, or a common parameter that could be codified in an SQL statement. I can email you some examples out of forum.

    To clarify, you want to change PERSON status from Active to Not Active, not change USER from ENABLED to DISABLED ?

    thanks

                                          

    Address: Bentley | 10052 Mesa Ridge Court Suite
    100 | San Diego | CA | 92121 | USA



  • Hi,

    Some examples would be great - the issue we will have is that we would like to have the audit trail as well, which an SQL update of users would not achieve.

    And that's correct we want to change the PERSON status from Active to Not Active, not change USER from ENABLED to DISABLED.

    Thanks.

  • Hi Lewis,

    Do you have access to the SDK?  If so I would expect there is a method that allows you to change the person object.

    So thinking out loud I would create a skill group called ‘chgUsers’ add all the people you want to edit to that.  I would then write a SQL query that would return all the users in this group, and then it would simply be a matter of looping through the resulting data table, running the appropriate method each time.

    Because it would be calling the proper method I would guess it would also capture the audit event.

    HTH.

    Andy.

  • You can write a sql cursor that uses the epb_chg_person stored procedure. This will produce object changed entries in the audit log. Setting input parameters as below will change nothing but the status.

    -- your query to select the @li_person_id s that you want to deactivate

    -- include person_id > 1 AND template = 'N' in your WHERE clause

    -- . . .

    ebp_chg_person

      @pi_person_id = @li_person_id

     ,@ps_new_code = '%'

     ,@ps_new_surname = '%'

     ,@ps_new_initials = '%'

     ,@ps_new_title = '%'

     ,@ps_new_full_names = '%'

     ,@ps_new_first_name = '%'

     ,@pi_new_class_id = -1

     ,@ps_new_national_id = '%'

     ,@ps_new_additional_code = '%'

     ,@ps_new_security_ref_no = '%'

     ,@pdt_new_security_exp_date = NULL

     ,@ps_new_status = 'N'

     ,@ps_new_remarks  = '%'

     ,@pi_called_by = @li_session_id -- to capture the user performing the action or use 1 for ADMIN

    @li_person_id and @li_session_id are integer parameters.

    Eric Rajala | Consultant

    Cohesive

    Email: eric.rajala@cohesivegroup.com

    www.bentley.com

       
    This is a test

  • Should add: if you are using the security_exp_date in this community, include it in the SELECT statement and pass in the date instead of NULL.

    Eric Rajala | Consultant

    Cohesive

    Email: eric.rajala@cohesivegroup.com

    www.bentley.com

       
    This is a test