Child fields are disabled


Author
Message
Doron Farber
Doron Farber
StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)
Group: Forum Members
Posts: 92, Visits: 612
Hi All,

From some reason the Child fields are disabled on Add mode, but are fine in Edit mode. Somehow before it worked fine.  In the Child object the IncludeInFormAdd is True and in the form level the IncludeInFormAddType is DetermainedByBusinessObject. This is just an exercise for me to learn the SF, but the child and the parent should be saved at the same time. Using SF 1.6.5.1

Thanks,

Doron

Replies
Doron Farber
Doron Farber
StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)
Group: Forum Members
Posts: 92, Visits: 612
Hi Trent,

I fixed the Fire Walls issue on the server level so it is possible to download the zip files. I understand where you are coming from, but the properly which is responsible to disable the child field is OFF. Even though I made it to work in a different way, I would like to understand what else can cause this problem again.  I am still learning SF and .Net so I can easily over look something simple. Also please let me know when you Save at least one record if you see any delay in the Save mode - just curious.

Thanks,

Doron

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Doron,

I looked at your sample...and as I mentioned on a previous post, we do not have MaintenanceFormClass.  Your problem is actually very simple.  First, when you setup a test environment, make sure that you have the same code in both places...in this case you didn't (i.e. The Navigated event of the Members BO).

In order to make the form1 work, you will need to do the following:

  1. Set the IncludeInFormAdd property to True on the Address BO (it was not set)
  2. It would be a good idea to set the ParentBusinessObject on the address to the member (this is not the problem, but if you want SF to manage the foreign keys for you, you will want to do this)
  3. And here is your problem...REMOVE THE FILL CODE in the navigated event of the Members BO.  If you comment out this code, it works great.  The problem is that your code isn't taking into account a new record, etc.  If you want to have this type of Fill logic inside the navigated event, then you will want to be sure to test on new records, etc.  For example,

    If MembersBO.CurrentRow.RowState = Added Then
        '-- DON'T DO ANYTHING!
    End If

Doron Farber
Doron Farber
StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)
Group: Forum Members
Posts: 92, Visits: 612
Hi Trent,
Thanks for your reply and see below.

Trent L. Taylor (06/19/2008)

And here is your problem...REMOVE THE FILL CODE in the navigated event of the Members BO.  If you comment out this code, it works great.  The problem is that your code isn't taking into account a new record, etc.  If you want to have this type of Fill logic inside the navigated event, then you will want to be sure to test on new records, etc.  For example,

If MembersBO.CurrentRow.RowState = Added Then
    '-- DON'T DO ANYTHING!
End If

If I remove the code found in the navigated method then when I click Next, Previous etc.. the child record will not be shown. Unless you have other suggestions to show the child record the below code works now:

Private Sub MemberInfoBO1_Navigated(ByVal e As MicroFour.StrataFrame.Business.NavigatedEventArgs) Handles MemberInfoBO1.Navigated
If Me.MemberInfoBO1.CurrentRow.RowState <> Data.DataRowState.Added Then
    If Me.MemberInfoBO1.Count > 0 Then
        Me.AddressMemBO1.FillByParentPrimaryKey(Me.MemberInfoBO1.MemberInfo_PK)
    Else
        Me.AddressMemBO1.Refresh()
    End If
End If
End Sub


Did run the form one time? Just worndered if you saved one record.Hehe

Regards,

Doron
 

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Doron, you are missing the point.  You can put code in the Navigated event, but you need to check on the RowState to determine what action to take.  Your code ALWAYS attempted to FillByParentPrimaryKey (or something along those lines).  That code makes no sense for a new record.  So test on the row state to determine how to retrieve your data.
Doron Farber
Doron Farber
StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)StrataFrame User (212 reputation)
Group: Forum Members
Posts: 92, Visits: 612
Ok Thanks
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Doron Farber - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Doron Farber - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Doron Farber - 17 Years Ago
                         You can use it if you understand when to remove the filter and reapply...
Trent L. Taylor - 17 Years Ago
                             ok thanks Trent
Doron Farber - 17 Years Ago
                                 Hi Trent, What else can disabled the child fields in Add mode. In the...
Doron Farber - 17 Years Ago
                                     No records available within the BO (check the MyBo.Count) or the...
Trent L. Taylor - 17 Years Ago
                                         Hi Trent, Yes I fighting this and I don't give up on it. This is...
Doron Farber - 17 Years Ago
                                             Hi Trent, Me and Edhy work together and we could not find out why the...
Doron Farber - 17 Years Ago
                                                 I tried to download your samples but got a firewall error on your end....
Trent L. Taylor - 17 Years Ago
                                                     Hi Trent, I fixed the Fire Walls issue on the server level so it is...
Doron Farber - 17 Years Ago
                                                         Doron, I looked at your sample...and as I mentioned on a previous...
Trent L. Taylor - 17 Years Ago
                                                             Hi Trent, Thanks for your reply and see below. [quote][b]Trent L....
Doron Farber - 17 Years Ago
                                                                 Doron, you are missing the point. You can put code in the Navigated...
Trent L. Taylor - 17 Years Ago
                                                                     Ok Thanks
Doron Farber - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search