Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I reference a BizOject’s child BizObject?
Message
From
11/08/2003 12:11:47
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
11/08/2003 08:29:35
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00818503
Message ID:
00818952
Views:
28
Brian,

I have a feeling this is due to HostObject not having a RefBizObj. Remember, HostObject is merely a reference to an object that hosts the ImmBusinessRuleHost interface. Not all compliant objects (mmBusinessEvent for example) have a RefBizObj collection. For this to work, you'll have to cast HostObject to mmBusinessObject or one of its subclasses:

(Sorry, not quite fluent in VB.NET, but I'll give it a shot <s>)
Dim loContact as Contact
Dim loClient as Client

loClient = (Client)me.HostObject;

///Now that you've cast loClient to a subclass of mmBusinessObject, typing "loClient." should bring RefBizObj in your Intellisense.
oCOntact loCOntact = (oCOntact)loClient.RefBizObj.Get(typeof(oCOntact));
I also noticed while typing this that your example has "oContact" in your call to typeof(), and "oCOntact" in the rest of the code. That will definitely bite you as well!

Hope that gets you on the right track,
---J

>Cathi,
>Did you run code similiarto your sample? I've tryed every consevable varyation and it wont work. Is the sample c#? HostObject.RefBizObj doesn't show up via intelli senese.
>the code below is one way I tryed it, but this wont run.
>the referance I'm creating loCOntact, The Rules host oClient, oClients child is oContact
>
>
>Dim loContact as Contact
>oCOntact loCOntact = (oCOntact)me.HostObject.RefBizObj.Get(typeof(oContact));
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform