UIAddIn Element

This optional element represents an AddIn that will be plugged into the model showing duplicate check threshold fields.This is useful for providing context-specific language relevant to the type of batch being used. This AddIn will be wired into multiple forms (for example, forms that add batch templates and import processes. As such, the class must inherit from Blackbaud.AppFx.UIModeling.Core.RootUIModelAddIn(Of RootUIModel).

The element contains an AssemblyName and ClassName attributes. The required AssemblyName attribute represents the name of the .NET assembly file containing the UIAddIn class. The required ClassName attribute represents the name of the class within the assembly that implements the component.

Here is an example of an AddIn refereced by the Constituent Update Batch:

  <DuplicateRecordCheck 
    SearchListID="cfce7b61-788b-40cb-a639-0e1d906cbae1" 
    IdentifiedDuplicateActionCaption="Update" 
    IdentifiedDuplicateActionCaptionResourceKey="$$update" 
    DuplicateResolutionHeaderCaption="Select a constituent to update" 
    DuplicateResolutionHeaderCaptionResourceKey="$$select_a_constituent_to_update" 
    HideIgnoreButton="true" 
    HideSearchResults="true" 
    IdentifiedDuplicateActionToPerform="Update" 
    LinkFieldID="PRIMARYRECORDID" 
    DuplicateMatchThresholdField="OVERALLMATCHTHRESHOLD" 
    NextDuplicateRecordField="GOTONEXTRECORD">
    <DuplicateResolutionUIComponent xmlns="bb_appfx_commontypes" FormUIComponentType="CustomComponent">
      <CustomComponentID AssemblyName="Blackbaud.AppFx.Constituent.ClientComponents.dll" ClassName="Blackbaud.AppFx.Constituent.ClientComponents.DuplicateConstituentResolutionView" />
    </DuplicateResolutionUIComponent>
    <MultipleMatchesMsg MessageText="This constituent matches multiple records." MessageTextResourceKey="$$this_constituent_matches_multiple_records" />
    
    <AutoMatch AutoMatchThresholdDataFormID="8cdcd98d-3cf0-4440-bfd3-1267678a3a51" 
               AutoMatchThresholdFormFieldID="AUTOMATCHTHRESHOLD" 
               OverallMatchThresholdFormFieldID="OVERALLMATCHTHRESHOLDBATCH" 
               SearchResultScoreColumn="MATCHPERCENTAGE" 
               SaveAutoMatchDataFormID="92dd7b70-4577-4093-add9-d938022eec5c" 
               SaveAutoMatchDataFormMatchedFieldID="PRIMARYRECORDID">
      
      <UIAddIn AssemblyName="Blackbaud.AppFx.Constituent.UIModel.dll" 
               ClassName="Blackbaud.AppFx.Constituent.UIModel.BatchConstituentDuplicateCheckAddIn" />
      
      <RaiseExceptions RaiseExceptionDataListID="511771b7-d728-4d3f-a5fc-f41069b46e32" 
                       BatchRowFieldID="BATCHROWID" 
                       AutoMatchRecordFieldID="AUTOMATCHRECORDID" 
                       RaiseExceptionColumn="DOMANUALREVIEWFORAUTOMATCH" />
    </AutoMatch>
    

And here is the BatchConstituentDuplicateCheckAddIn class:

Public Class BatchConstituentDuplicateCheckAddIn
    Inherits RootModelAddIn(Of RootUIModel)

    Public Overrides Sub Init()

        SetFieldCaption("USEAUTOMATCH", My.Resources.Content.ConstituentDuplicateCheckAddIn_MatchedConstituents)
        SetFieldCaption("AUTOMATCHACTION", My.Resources.Content.ConstituentDuplicateCheckAddIn_UpdateConstituents)
        SetFieldCaption("OVERALLMATCHACTION", My.Resources.Content.ConstituentDuplicateCheckAddIn_ReviewConstituents)
        SetFieldCaption("NOMATCHACTION", My.Resources.Content.ConstituentDuplicateCheckAddIn_AddNewConstituent)

        SetFieldTooltipText("MATCHCONFIDENCEHEADER", My.Resources.Content.ConstituentDuplicateCheckAddIn_MatchConfidenceHeaderTooltip)

    End Sub

    Private Sub SetFieldCaption(ByVal fieldId As String, caption As String)
        Dim m = Me.HostModel
        If m.Fields.Contains(fieldId) Then
            m.Fields(fieldId).Caption = caption
        End If
    End Sub

    Private Sub SetFieldTooltipText(ByVal fieldId As String, text As String)
        Dim m = Me.HostModel
        If m.Fields.Contains(fieldId) Then
            m.Fields(fieldId).ToolTipText = text
        End If
    End Sub

End Class