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,
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.
Thanks for the information - I'm looking at the SDK with the following scenario:
I have a CSV with the user ID's of the person's I'd like to disable, however I can't seem to find a way to return the actual person object and manipulate it.
For example, I've tried the following:
Session sess = new Session();sess.Connect(eB.Data.Session.SessionTypes.Both, "myServer");sess.Logon(Session.SessionTypes.Both, "eB_Development", "TESTUSER", "TESTPASSWORD");
System.IO.StreamReader file = new System.IO.StreamReader("c:\\userPersonIds.csv");string line;while ((line = file.ReadLine()) != null){
try { Person pers = new Person(sess, int.Parse(line)); Console.WriteLine(pers.FullName); } catch (Exception ex) { Console.WriteLine("No such user " + ex.Message); }
}
file.Close();
sess.LogoffAndDisconnect();
However the object that is instantiated appears to be empty, for example: pers.FullName == NULL
Hi,
Code is all correct, but need to call the .Retrieve to retrieve the information before you can manipulate / retrieve the data like below:
Session sess = new Session();
sess.Connect(eB.Data.Session.SessionTypes.Both, "myServer");
sess.Logon(Session.SessionTypes.Both, "eB_Development", "TESTUSER", "TESTPASSWORD");
System.IO.StreamReader file = new System.IO.StreamReader("c:\\userPersonIds.csv");
string line;
while ((line = file.ReadLine()) != null)
{
try
Person pers = new Person(sess, int.Parse(line));
pers.Retrieve(“Header”);
Console.WriteLine(pers.FullName);
catch (Exception ex)
Console.WriteLine("No such user " + ex.Message);
Do let me know if you still not able to retrieve the data!
Note that a person's "FullName" is not guaranteed to be populated. The Code, Surname and Initial are mandatory. You may get some blank lines in your write statement. These do not indicate a problem
Eric Rajala | Consultant
Cohesive
Email: eric.rajala@cohesivegroup.com
www.bentley.com
Thanks Manav, that did the trick - is there any documentation regarding the retrieval types? For example you have suggested "Header", are there others/?
I checked that we have Retrieve("Header;Attributes;Files;Tags;Copies").