This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Create UNSAccountB with VB script - Input string was not in a correct format

We're creating UNSAccountB record using script:

Dim UNSAccountB As IEntity = Nothing
Dim UNSRootB As IEntity = TSB_UNSRootB_Get(Ident_UNSRoot)
Dim TSBAccountDef As IEntity = TSB_TSBAccountDef_Get(Ident_TSBAccountDef)
Dim TSBBehavior As IEntity = TSB_TSBBehavior_Get(Ident_TSBBehavior)

...

Try
	If Session.Source.TryGet( Query.From("Person") _
		    					   .Where(f.Comparison("UID_Person", UID_Person, ValType.String, CompareOperator.Equal, FormatterOptions.NonUnicodeLiterals)) _
			    				   .SelectNonLobs, Person ) Then

        UNSAccountB = Session.Source.CreateNew("UNSAccountB")
        UNSAccountB.PutValue("FirstName", Person.GetValue("FirstName").String)
        UNSAccountB.PutValue("LastName", Person.GetValue("LastName").String)
        ...
        UNSAccountB.PutValue("UID_UNSRootB", UNSRootB.GetValue("UID_UNSRootB").String)
		
        Using uow As IUnitOfWork = Session.StartUnitOfWork()
	        uow.Put(UNSAccountB)
	        uow.Commit()
        End Using

In most castes it's working as expected but in one case it fails with error message: Input string was not in a correct format. After debug I came to conclusion that UID_UNSRootB of specified Target System is a problem. The problematic UID has a value

57b46151-97c4-4bc3-9f77-4eea3a4dcb03

Target System is defined as follows:

Target system: VRS
Target system type: Unified Web Service
Canonical name: VRS
Distinguished name: system=VRS
Display name: Versis
Account definition: Konto Versis

Weird thing is that on PROD environment there is the same behaviour where UID_UNSRootB is equal:

8ccc6a2f-d3be-4159-b4ab-3f43a967e63c

The problem is only with this one Target System

IDM ver: 7.1.1

Parents Reply Children