Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Web Services

Reply
Contributor
RPS2
Posts: 11
Registered: ‎12-19-2010
My Device: BlackBerry 9000
My Carrier: AT&T

Disable users using .net C sharp

I am unable to disable and delete users .net C# using .net framework 3.0 I think that the newer disableBlackBerryUserAndDeleteUser process.  Is there some way to disable then delete the user in different setps.   

 

 

 

 

private

{

Int16 userIDs = Convert.ToInt16(Prompt.prompt("Please enter userID of user to be deleted"));

dBBUAD.userId = userIDs;disableBlackBerryUserAndDeleteUser dBBUAD = coreWebService.disableBlackBerryUserAndDeleteUser();

dBBUAD.removeMailboxInfo =

coreWebService.disableBlackBerryUserAndDeleteUserAsync(dBBUAD);

 

}

void deleteUsers()

Please use plain text.
Contributor
RPS2
Posts: 11
Registered: ‎12-19-2010
My Device: BlackBerry 9000
My Carrier: AT&T

Re: Disable users using .net C sharp

I changed my code to the following:

disableBlackBerryUserAndDeleteUser deleteRequest = new disableBlackBerryUserAndDeleteUser();disableBlackBerryUserAndDeleteUserResponse deleteResponse = coreWebService.disableBlackBerryUserAndDeleteUser(deleteRequest);

 

private void deleteUsers()

{

Int16

userIDs = Convert.ToInt16(Prompt.prompt("Please enter userID of user to be deleted"));

 

deleteRequest.userId = userIDs;

 

 

DisableBlackBerryUserAndDeleteUserResult result = deleteResponse.returnValue;

if (result.disableBlackBerryUserAndDeleteUserReturnStatus.code != DisableBlackBerryUserAndDeleteUserReturnStatusEnumType.SUCCESS)

{

System.Console.WriteLine("error = " + result.disableBlackBerryUserAndDeleteUserReturnStatus.message);

}

else

{System.Console.WriteLine("User Deleted");

 

}

}

When I delete a user the user is no longer viewable by using the find user method.  But the user's data still exists is three tables.

I then add the line

deleteRequest.removeMailboxInfo =

true;

Should this wipe out all the mailbox info?

Do I have to wait until a database refresh to add the user back to my BlackBerry users?

Please use plain text.