There was a problem with data synchronization-data transfer to ad.The data for the employee (manager) is not updated – the objectkeymanager@ADSAccount field.

There is a boxed script here (and there are commented lines that say that this field should be updated-But it is not updated

Dim func As Func(Of Object) = Function()

    'If $ObjectKeyManager$ isnot nothing andalso $ObjectKeyManager$.Length > 0 Then

                '               Return $ObjectKeyManager$ ' закомментировать строку, чтобы руководитель обновлялся в AD

                'End If

                Dim uid_personHead As String = $FK(UID_Person).UID_PersonHead$

                if String.IsNullOrWhiteSpace(uid_personhead) Then Return Nothing

                Dim sql As ISqlFormatter = Session.SqlFormatter

                Dim whereClause As String = sql.AndRelation(

                               sql.Comparison(Table.ADSAccount.SAMAccountName, "adm%", ValType.String, CompareOperator.NotLike),

                               sql.Comparison(Table.ADSAccount.SAMAccountName, "loc%", ValType.String, CompareOperator.NotLike),

                               sql.UidComparison(Table.ADSAccount.UID_Person, uid_personhead)

                )

                Return Session.Source.GetSingleValue(Of String)(Query.From(Table.ADSAccount).Where(whereClause).Select(Table.ADSAccount.XObjectKey))

End Function

 

If Not CBool(Connection.Variables.Get("FULLSYNC")) Then

                Select Case ($FK(UID_TSBBehavior).ITDataUsage:Int$)

                               Case 0:'do not get data from employee

                               Case -1:'fill property initially from the ITData of the employee

                                               If Not $[IsLoaded]:Bool$ Then

                                                               Value = func()

                                               End If

                               Case 1:'update property depending on ITData of the employee

                                               Value = func()

                End Select

End If

 

The problem is solved by manual synchronization .

But why doesn't the synchronization happen automatically

Parents Reply Children
  • Was the employee's manager changed during an import or manually in some of the tools or how?

    The template on ADSAccount.ObjectKeyManager is exactly as you have posted it?

    The template is marked as "Overwriting"?

  • the template is the same as it was posted. The overwrite check box is

    Dim func As Func(Of Object) = Function()
    'If $ObjectKeyManager$ isnot nothing andalso $ObjectKeyManager$.Length > 0 Then
    ' Return $ObjectKeyManager$ ' закомментировать строку, чтобы руководитель обновлялся в AD
    'End If
    Dim uid_personHead As String = $FK(UID_Person).UID_PersonHead$
    if String.IsNullOrWhiteSpace(uid_personhead) Then Return Nothing
    Dim sql As ISqlFormatter = Session.SqlFormatter
    Dim whereClause As String = sql.AndRelation(
    sql.Comparison(Table.ADSAccount.SAMAccountName, "adm%", ValType.String, CompareOperator.NotLike),
    sql.Comparison(Table.ADSAccount.SAMAccountName, "loc%", ValType.String, CompareOperator.NotLike),
    sql.UidComparison(Table.ADSAccount.UID_Person, uid_personhead)
    )
    Return Session.Source.GetSingleValue(Of String)(Query.From(Table.ADSAccount).Where(whereClause).Select(Table.ADSAccount.XObjectKey))
    End Function

    If Not CBool(Connection.Variables.Get("FULLSYNC")) Then
    Select Case ($FK(UID_TSBBehavior).ITDataUsage:Int$)
    Case 0:'do not get data from employee
    Case -1:'fill property initially from the ITData of the employee
    If Not $[IsLoaded]:Bool$ Then
    Value = func()
    End If
    Case 1:'update property depending on ITData of the employee
    Value = func()
    End Select
    End If

  • What about

    • Was the employee's manager changed during an import or manually in some of the tools or how?
  • during the transition to another department, the employee's manager changed automatically in the employee card-person. but the ad manager has not changed

  • Okay. What triggered the department change?

    What process triggered then the change of the manager in the person?

    I am insisting because the only reason I am seeing why your template is failing, could be an active FullSync flag during the change at Person.UID_PersonHead.

  • Provoked personnel changes. The person moved from one department to another. We received information about this. I don't have any scripts in the UID_person field and the owerwrites checkbox is not enabled

  • Provoked personnel changes

    Does that mean you changed the setting using the Manager or Object Browser and it doesn't work?

  • I doubt. I try not to make any changes to the scripts. Since I have been working with idm recently. And I'm afraid to make any changes. There is an assumption that such data was already entered in the idm initially. Since the problem is observed only in employees who were before the introduction of idm.We had an implementation in May.

  • This is beginning to make sense now.

    If the PersonHead information was already present in the person before your custom template was introduced, then it is totally normal that the template will not be triggered. The templates are triggered by data changes of one of the "used" properties only.

    It sounds like during the implementation it was forgotten to trigger a recalculation of the templates, which runs all templates of an object.

  • not forgotten. This was done on purpose. There are some subtleties in the data that should not have been updated. Already after the melons were loaded into the idm, changes occurred in the employee-he was transferred to another department-the employee's manager was replaced. And where is this recalculation of templates located?