Not setting values for a User Interface Extension generates an error. (NETIQKB49206)

  • 7749206
  • 02-Feb-2007
  • 19-Jun-2007

Resolution

fact
Directory and Resource Administrator 7.x

fact
Directory and Resource Administrator 8.0

symptom
Not setting values for a User Interface Extension generates an error.

symptom
Error: 'Saving changes to User. The parameter is incorrect. In some cases, problems are caused by custom properties. The custom properties are <name>. Would you like to submit the operation without the custom properties?'

symptom
Cannot save changes to a user.

cause
Attribute fields assigned to user interface extensions are required fields and must have a value to pass.

fix

To work around the problem, use a pre-task trigger to prevent an empty user extension value from being sent to the server for the UserCreate and UserCopy operations. The trigger should be used for the UserCreate and UserCopy, or clone, operations. The following is an example of the trigger:

#!vbscript
 
'
'  Pre-task trigger RemoveEmptyUserExtension
'
'
'  This trigger prevents an empty user extension value from being sent to the server for the UserCreate
'  and UserCopy (clone) operations.
 
Function Main()
 
   
    Dim sCurrentOperation
    Dim sErrorMsgText
    
    Const sValidOperations = "UserCreate UserCopy"
 
    On Error Resume Next
 
    Main = False
  
    '********************************************************************
    ' Is this script running for the correct operation(s) ?
    '********************************************************************
   
    sCurrentOperation = ""
    sCurrentOperation = VarSet.Get("In.OperationName")
 
    If Len(sCurrentOperation) = 0 Then
        varset.put "Out.ErrorMsg.Script", vbCrLf & "OperationName not retrieved from Varset."
        Exit Function
    End If
 
    If InStr(LCase(sValidOperations), LCase(sCurrentOperation)) = 0 Then
        Main = True
        Exit Function
        sErrorMsgText = vbCrLf & "This script is running for the wrong operation (" & sCurrentOperation
        sErrorMsgText = sErrorMsgText & vbCrLf & "This script is valid only for the following operation: " & sValidOperations
        VarSet.Put "Out.ErrorMsg.Script", sErrorMsgText
        Exit Function
    End If

    Err.Clear
  
    '*********************************************************************
    ' Check to see if the specific user extension property is empty. 'Middle Name' (middleName) used in this example. 
    ' Repeat for each additional user extension property.
    '*********************************************************************

    If Varset.Get("In.Properties.middleName") = "" Then
               varset.Remove "In.Properties.middleName"
    End If
   
    Main = True

End Function

A Fix Request has been opened with Development to resolve this issue in a future version of Directory and Resource Administrator.



note
Example scripts that are provided on the NetIQ Knowledge Depot or referenced in Knowledge Base articles are not part of the supported product set. Customers should be aware that NetIQ Technical Support does not support issues that may arise from the use of example scripts.

Additional Information

Formerly known as NETIQKB49206