Changing LDAP Domain distinguished name causes template error.
VI.DB.Implementation.SingleDbObject.Save () at VI.DB.Implementation.SingleDbObject._PropagateTemplates () at VI.DB.Processing.SynchronousProcessingQueue.Add (IDbJob job) at VI.DB.Processing.DbJobDynamicTemplate.Run (IConnection conn) at VI.DB.Implementation.DbColumn._ExecuteTemplateInternal (Boolean default value)
[881 064] Forbidden to place the object under itself or a child object. at VI.DB.Implementation.DbColumn._ExecuteTemplateInternal (Boolean default value) at VI.DB.Implementation.DbColumn.set_NewValue (Object value) at VI.DB.Implementation.DbColumn._RaiseEvent (Column EventHandler hdl, ColumnEventArgs e) at VI.AE. Customizer.LDAPContainer.UID_ParentLDAPContainer_ValueChecking (Object sender, ColumnEventArgs e) at VI.AE.Customizer.LDAPContainer._IsParent (String theChildUID, String theParentUID)
The error comes up because when you change the domain DN the template on LDAPContainer.UID_ParentLDAPContainer is triggered. And for the TOP container this template calculate the same TOP container to be the parent. But the Customizer check prevents this assignment because the object cannot be the parent of itself
Implement a custom template on LDAPContainer.UID_ParentLDAPContainer so that the value is set to blank if it's the TOP container.
if ($ObjectClass$.ToUpper() = "TOP") then
Value = ""
else
Dim f As ISqlFormatter = Connection.SqlFormatter
Value = Connection.GetSingleProperty("LDAPContainer","UID_LDAPContainer", _
f.AndRelation(f.Comparison("UID_ParentLDAPContainer", "", ValType.String, CompareOperator.Equal,FormatterOptions.None), _
f.Comparison("ObjectClass", "top", ValType.String), _
f.Comparison("DistinguishedName", $FK(Ident_Domain).DistinguishedName$, ValType.String)))
end if
(The "else" branch being the original template)
© 2024 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center