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

ISystemObject not defined

I'm getting an error 'ISystemObject not defined' in this line: Dim dbLDAPAcccountEnt as ISystemObject = SystemObject.Connection.QueryObject(SystemQuery .From ("LDAPAccount") _
.Select ("UID_LDAPAccount", "CCC_Affiliation", "CCC_ScopedAffilation") _
.Filter (String.Format("UID_Person='{0}',$UID_Person$)) _
).Result.FirstOrDefault

I'm using this in a table script, so I can't add an Imports statement (I don't think). I've tried changing ISystemObject to VI.Projector.Connection.ISystemObject and VI.Projector.ISystemObject, but those aren't working either. Does anyone know where I can find the correct reference? I don't have Visual Studio set up with the libraries yet, so I don't have any intellisense to use. Any suggestions?

  • It is not supported to use the ISystemObject interface in table scripts. This interface is exclusively for use in synchronization projects.

    You should use the iEntity interface as described in the SDK. You will find sample code about how to use this interface in the script samples of the SDK on the product DVD.

    Dim f As ISqlFormatter = Session.SqlFormatter
    Dim eLDAPAccount As IEntity
     
    Dim qPerson = Query.From("LDAPAccount") _
            .Where(f.UidComparison("UID_Person", $UID_Person$)) _
            .Select("UID_LDAPAccount""CCC_tamuEduPersonAffiliation""CCC_tamuEduPersonScopedAffil""CCC_eduPersonScopedAffilation""CCC_eduPersonAffiliation")
     
    ' Create LDAPAccount entity
    eLDAPAccount = Session.Source.GetCollection(qPerson).FirstOrDefault
     
    ' Use the values for further processing
    ' eLDAPAccount.GetValue("CCC_tamuEduPersonAffiliation").String 
    

     

  • Thanks Markus - I was able to compile with your help. If I need to filter on more than one criteria, I should wrap the f.Comparisons inside f.AndRelation(), correct?