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
  • I have another such question. Also according to the manager .In our company, after the dismissal of an employee, the field of the manager is not cleared. There are a number of some problems because of this. In the address book, the dismissed employee is kept in the subordination with the boss. The same thing happens in other systems.Bitrix. Is there any way to configure the manager field to be cleared in the active directory user account?

Children
No Data