Hi,
I have a problem with data import and updating updated person's Manager value to Ads Account Manager field-
Data import changing Manager value for Managed employees gives an error stating that:
Active Directory user accounts: Viewing permission denied for value "Container".
The template looks like this:
Dim f as ISqlFormatter=connection.SqlFormatter
SelectCase ($ManageLevel:Int$)
Case0:'Unmanaged (do not get data from employee)
Case1:'Managed (fill all possible fields about employee)
Value = connection.GetSingleProperty("ADSAccount", "UID_ADSAccount", f.Comparison("UID_Person", $FK(UID_Person).UID_PersonHead$, valtype.string))
CaseElse:'Unspecified manage level
ThrowNew ViException(#LD("Non specified manage level: {0}", $ManageLevel:Int$)#)
EndSelect
This works if template is fired manually.
What am I doing wrong:)
Best Regards:
Miska