Quantcast
Channel: Software Communities : Popular Discussions - Dell One Identity Manager
Viewing all articles
Browse latest Browse all 845

Cannot remove PersonInOrg entries from VB script

$
0
0

Hello,

 

I am trying to remove all business roles a person has assigned from a VB script. It runs but there are no errors and the records are still there. Nothing in the Job Queue pending. Here is my code, can anybody help out on what else I need?

 

'Query all business roles for Person

colImport = Connection.CreateCol("PersonInOrg")

                              colImport.Prototype.WhereClause = "UID_Person = '"+uidPerson+"'"

                              colImport.Load(CollectionLoadType.Slim)

                              'Remove each business role

                              For Each elem In colImport

                                                  Try

                                                            obj = elem.Create()

                                                            obj.Delete()

                                                            obj.Save()

                                                            If debug Then VID_Write2Log(logFile,String.Format("Business Role removed ok"))

                                                  Catch ArgumentException As Exception

      VID_Write2Log(logFile,String.Format("Business Role removal for PersonInOrg failed: {0}",ArgumentException.ToString))

                                                  End Try

 

                              Next

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 845

Trending Articles