Hello,
We are planning to provide an application with information from the One-IM database.
Here we have created a custom table - including with a column CCC_DepartmentX, which contains the XObjectKey of the department.
Since it is an MSSQL database, we have created a Sync Project with the Native Database Connector, which we now want to get to work.
The colleagues in the other application need the "ObjectID" of the relevant departments as information - in other cases I add a virtual attribute for this in the mapping
and act with "Key resolution by reference" - here I can e.g. access the order in PersonWantsOrg and fetch me the values that should be in the mapping.
In the case of the ObjectID this does not work with the XObjectKey - does that mean that the "Key resolution by reference" works only works with UIDs?
What other option would we have in the sync editor to get from a column containing the XObjectKey to the other table to get the required values?
Would it be right then to create a script property for it?
I created this for test purposes and stored it with the following read script:
Imports VI.Projector.Connection Dim Department As ISystemObject = SystemObject.Connection.QueryObject(SystemQuery _ .From("Department") _ .Select("ObjectID") _ .Filter(String.Format("XObjectKey = '{0}'", $CCC_ObjectKeyDependency$ )) ).Result.FirstOrDefault Dim ObjectID As String = Department.GetValue("ObjectID").AsString If Not Department Is Nothing Then If String.IsNullOrEmpty(ObjectID) Then $vrt_ObjectID$ := ObjectID End If End If Thank you for further information or ideas on how we can proceed.
The script can be compiled without an error in the sync editor - but it does not return any values. The column is empty for all existing data records when I look at the values in the One-Identity Manager connection via Browse.
Thank you for further information or ideas on how we can proceed.