Manually setting relations


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Smile Glad you found your trouble spot and got it working.  I understand, I have been there before!
Paul Chase
Paul Chase
Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
I was wrong I forgot to remove the test relation that I set up in the BO to get the code from the designer. Guess I was just over anxious to get this working
Paul Chase
Paul Chase
Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Trent,

I guess it is case sensitive??? Seems like that was the issue.

Paul Chase
Paul Chase
Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
That is all fine..... I need to spend some more time with it to give you a better idea if the issue but basically what I have is an address table and and address BO. I have created a configurable user control so I can use the same address control thoughout the app to store addresses. I have set the bo translations etc and everything works nice except the relations part. I'll look at it some more and try to give you a better idea of what exactly is going on
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
More than likely your full name is wrong or cannot be resolved.  The best way to get the exact settings rather than guessing is to use the type editor (builder) to create the relationship for you.  Then go the InitializeComponent method of that BO (it will be in the partial class) and copy out the foreign field, primary field, and BO type and then place it into your code.  You can then go back and reset teh parent relationship so that you can just do it in code.  Compare what you have to what is generated through the type editor to find your problem.
Paul Chase
Paul Chase
Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
I am trying to manually set a relation in the Form's load event as follows but it doesnt seem to work. Any ideas on what I am missing or is this the wrong approach?

Me.BoAddress1.ParentBusinessObject = Me.BoEmployee1

Dim loRelation As New MicroFour.StrataFrame.Business.BusinessParentRelationship

loRelation.ForeignKeyField() = New String() {"Adr_FK_ID"}

loRelation.ParentPrimaryKeyField() = New String() {"EMP_PK"}

loRelation.ParentBusinessObjectType = "PayrollBO.BOEmployee"

'Set the Relationship

Me.BoContacts1.ParentRelationship = loRelation


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search