As of April 17, 2018, this site is now in read-only mode. To start new Blackbaud Developer’s discussions, you will find Developer Discussions in the Blackbaud CRM Community.
To post or respond to Blackbaud Community discussions, you will have to login using a www.blackbaud.com login. Learn how to login here. If you have questions or need assistance, please email email@example.com.
I have a data form extension I've added to extend the constituent summary profile view form. In addition to wanting to add a few new fields to the form in true extension spirit, I also want to change the value of the OOB RELATEDCONSTITUENT (Spouse) field to equal the value from the extension form since we want to be able to see the name of a deceased spouse if one should exist, rather than nothing. I've followed the instructions in the SDK resources to a T and still am having no luck getting this to work. The instructions are a bit different because they instruct on how to influence a field in the extension form based on the change to a field in the parent form. Since I am working with two view forms, nothing ever changes, but I can't seem to find a method that would be the ParentModel equivalent of LoadedEventArgs. This is probably something simple and stupid, but does anyone have any experience getting a similar scenario to work? The following is my code:
Public Class ConstituentSummaryProfileExtensionViewCustomUIModel
Private _parentmodel As ConstituentSummaryProfileViewFormUIModel
Private Sub ConstituentSummaryProfileViewFormUIModel_HostModelChanged(ByVal sender As Object, ByVal e As Blackbaud.AppFx.UIModeling.Core.lo) Handles Me.HostModelChanged
If _parentmodel Is Nothing Then
_parentmodel = DirectCast(Me.HostModel, ConstituentSummaryProfileViewFormUIModel)
If Me.HostModel IsNot Nothing Then
AddHandler _parentmodel.RELATEDCONSTITUENT.ValueChanged, AddressOf RELATEDCONSTITUENT_ValueChanged
RemoveHandler _parentmodel.RELATEDCONSTITUENT.ValueChanged, AddressOf RELATEDCONSTITUENT_ValueChanged
Private Sub RELATEDCONSTITUENT_ValueChanged(ByVal sender As Object, ByVal e As Blackbaud.AppFx.UIModeling.Core.ValueChangedEventArgs)
Dim spouse = Me.RELATEDCONSTITUENT.Value.ToString
If _parentmodel.RELATEDCONSTITUENT.Value = Nothing Then
_parentmodel.RELATEDCONSTITUENT.Value = spouse
If the value never changes couldn't you just set the value when you get the parent model?