IBM Support

NotesAdministrationProcess.RenameWebUser returns "A required argument has not been provided" error

Question & Answer


Question

When using the NotesAdministrationProcess.RenameWebUser method, the documentation states that only the first 2 arguments are required, the rest are optional. However if you do not provide Values for the optional parameters the error "A required argument has not been provided" is generated.

Syntax
noteID$ = notesAdministrationProcess.RenameWebUser( username$ , newfullname$ [ , newlastname$ ] [ , newfirstname$ ] [ , newmiddleinitial$ ] [ , newshortname$ ] [ , newinternetaddress ] )

Parameters
username$
String. The full hierarchical name (can be abbreviated) of the user.
newfullname$
String. New full hierarchical name (can be abbreviated).
newlastname$
String. Optional. New last name. An empty string means just that. An asterisk (*) means no change. Defaults to no change.
newfirstname$
String. Optional. New first name. An empty string means just that. An asterisk (*) means no change. Defaults to no change.
newmiddleinitial$
String. Optional. New middle initial. An empty string means just that. An asterisk (*) means no change. Defaults to no change.
newshortname$
String. Optional. New short name. An empty string means just that. An asterisk (*) means no change. Defaults to no change.
newinternetaddress$
String. Optional. New internet address. An empty string means just that. An asterisk (*) means no change. Defaults to no change.
Return value
noteID$
String. The note ID of an entry created in the Administration Requests database.

However, when using the method, if you only supply 2 arguments, the following error is encountered:
"A required argument has not been provided"

The sample code is as follows:
Dim session As New NotesSession
Dim adminp As NotesAdministrationProcess
Dim noteID As String
Dim theName As New NotesName("Mary Smith/MyOrg")
Set adminp =session.CreateAdministrationProcess("MyServer/MyOrg")

'This will generate an error message even though it conforms to the documented specs for this 'method.
noteid = adminp.RenameWebUser("WebUser1", "Mary Newlywed/MyOrg")

If noteid<> "" Then
Dim db As New NotesDatabase("MyServer/MyOrg", "admin4.nsf")
Dim ws As New NotesUIWorkspace
Call ws.EditDocument(False, db.GetDocumentByID(noteid$))
End If

Answer

This issue has been reported to development and they are looking into this issue. As a way to work around this issue you can specify all parameters in order to get CreateAdministrationProcess to work:

Sub Initialize
Dim session As New NotesSession
Dim adminp As NotesAdministrationProcess
Set adminp = session.CreateAdministrationProcess("MyServer/MyOrg")
noteid$ = adminp.RenameWebUser("CN=Mary Smith/O=MyOrg","CN=Mary Newlywed/O=NewOrg", "Newlywed", "Mary", "", "MNewlywed", "Mary Newlywed@MyOrg.com")
If noteid$<> "" Then
Dim db As New NotesDatabase("MyServer/MyOrg", "admin4.nsf")
Dim ws As New NotesUIWorkspace
Call ws.EditDocument(False, db.GetDocumentByID(noteid$))
End If
End Sub

Internal Use Only

NotesAdministrationProcess.RenameWebUser reports incorrect error message

[{"Product":{"code":"SSVRGU","label":"IBM Domino Designer"},"Business Unit":{"code":"BU003","label":"Collaboration Solutions"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5","Edition":"Edition Independent"}]

Document Information

Modified date:
11 September 2018

UID

swg21251953