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
  • I was also advised to activate the data import module in the Synchronization editor-workflows-users

    but I'm not sure that this will help. There is a chance to break everything that is already there

    1. If Checking “data import”, this will  unset FULLSYNC (This means FULLSYNC=false, and most templates DO fire) 2. If Un-checking “data import”, this will  set FULLSYNC (This means FULLSYNC=true, and most templates do NOT fire)

Reply
  • I was also advised to activate the data import module in the Synchronization editor-workflows-users

    but I'm not sure that this will help. There is a chance to break everything that is already there

    1. If Checking “data import”, this will  unset FULLSYNC (This means FULLSYNC=false, and most templates DO fire) 2. If Un-checking “data import”, this will  set FULLSYNC (This means FULLSYNC=true, and most templates do NOT fire)

Children
No Data