This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ADSaccount-->UID_ADSAccountManager manager attribute

Hi Team,

I am trying to push the value of Person-->UID_PersonHead into ADSaccount-->UID_ADSAccountManager.But I am getting below error message

Branden) could not be saved!
Could not save object Employees (Davis, Branden).
at VI.DialogEngine.DialogEngine.SaveDocument(IDocument[] documents, Schedule schedule)
at VI.MVC.Document.Save(Boolean reloadIfNecessary)
at VI.MVC.SingleDBObjectDocument.OnSave(Boolean reloadIfNecessary)
at VI.DB.Implementation.SingleDbObject.Save()
Could not save object Active Directory user accounts (asurionlab.org/Users/Branden Davis [USER]).
at 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.SingleDbObject.Save()
Error during execution of statement: update ADSAccount set UID_ADSAccountManager = N'00075c5a-a30a-46e1-9c69-798186b13419', xdateupdated = GetUTCDate(), XUserUpdated = N'viadmin' where UID_ADSAccount = N'ec07f9f6-a65e-4062-8fd9-589ef50b2f4a' and (isnull(UID_ADSAccountManager, N'') = N'' and isnull(vi_consistent, N'') <> N'D')
at VI.DB.Implementation.SingleDbObject.Save()
at VI.DB.Implementation.SingleDbObject._UpdateDB(Boolean checkRights)
at VI.DB.SqlExecutor.SqlExecuteNonQuery(String sqlStatement)
at VI.DB.SqlExecutor.SqlExecuteNonQuery(IQueryProvider provider, IDataParameter[] parms)
Database error 50000: detected in (SRV=LABONEDB701, DB=Q1IM) Procedure vi_2ADSAccount, Line 327
at VI.DB.SqlExecutor.SqlExecuteNonQuery(IQueryProvider provider, IDataParameter[] parms)
at VI.DB.SqlExecutor._SqlExecuteNonQuery(DbStatement stmt)
Database error 50000: Cannot insert object in ADSAccount because the associated object in ADSAccount does not exist. Rule R757

My Template code for ADSaccount-->UID_ADSAccountManager

Select Case ($ManageLevel:Int$)
Case 0:'Unmanaged (do not get data from employee)
Case Else:'Managed (fill all possible fields about employee)
Value = $FK(UID_Person).UID_PersonHead$
End Select

Can you please suggest how i can achieve this?

Regards,
PS

Parents
  • Hi Pankaj,


    My first question would be .... does "Bell, Iris" have an ADSAccount?

    If they do, my second question would be ..... Have you set the custom template to be an overwriting template?

    If yes, then my third question would be .... Have you changed anything on the account to make the template fire?

    If not, open the target ADSAccount in ObjectBrowser and run 'Target > Execute templates' ..... if the template is correct and the manager has an ADSAccount you should see UID_ADSAccountManager get a value .... then 'Save'.


    HTH, Barry.

Reply
  • Hi Pankaj,


    My first question would be .... does "Bell, Iris" have an ADSAccount?

    If they do, my second question would be ..... Have you set the custom template to be an overwriting template?

    If yes, then my third question would be .... Have you changed anything on the account to make the template fire?

    If not, open the target ADSAccount in ObjectBrowser and run 'Target > Execute templates' ..... if the template is correct and the manager has an ADSAccount you should see UID_ADSAccountManager get a value .... then 'Save'.


    HTH, Barry.

Children
No Data