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

Correct way to use the ObjectWalker in custom scripting?

Dear community,

can someone give me an example using the objectwalker correctly in scripting IDMv7 an up.

Last time I needed objectwalking was in v6 with the ObjectWalker method of an ISingleDbObject.

But if I understand the changelogs correctly ISingleDbObject is a lagcy class and you should better use IEntity.

Would be nice I someone could give me an example for that with the futureproof classes and methods.

An example usecase would be comming from an PWO and getting the CustomProperty01 of the Org's AccProduct.

  • Hi Florian,

    if you take a look at the ScriptSamples in the SDK on the product delivery, you will find an example for the ObjectWalker based on the IEntity interface.

    The samples dealing with the object layer of OneIM have been updated to demonstrate the new interface.

    Here is the sample from 8.0.1 (works the same in 7.x).

    '*************************************************************************
    '*
    '* ObjectWalker allows getting values of the base object and any objects
    '* reachable by foreign key relations. It caches values and lowers the database
    '* pressure for repeating access to the same values.
    '* 
    '* The FK notation is identical to the notation in template dollar expressions.
    '*          
    '*************************************************************************
    Public Sub DBObjects_ObjectWalker(ByVal uidAdsAccount As String)
        Dim dbAccount As IEntity
        Dim strSubType As String
    
        ' Load the ADSAccount object
        dbAccount = Session.Source.Get("ADSAccount", uidAdsAccount)
    
        ' Get the Ident_ADSDomainSubType of the correspondig Domain object
        strSubType = dbAccount.CreateWalker(Session).GetValue("FK(UID_ADSDomain).FK(UID_ADSDomainSubType).Ident_ADSDomainSubType").String
    
    End Sub
    

  • Thank you Markus,

    that helped me a lot Slight smile