Announcement

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 community@blackbaud.com.

1.7k questions

3.2k answers

401 users

Categories

1.7k questions

3.2k answers

401 users

I have a split revenue record with multiple destinations and I need to display a link to each destination on a view data form. Is there a way to add UI actions dynamically from UI Model?

I am using CRM 3.0

asked by allaterentieva (560 points)
edited by allaterentieva

1 Answer

 
Best answer

I'm not sure if you can do this in 3.0 or not but you can do something like this...

In your meta data for the collection specify a UI action

<FormField FieldID="SPLITS" DataType="XML">
  <Collection ViewMode="Repeater">
    <Fields>
      ...
      <FormField FieldID="DESIGNATIONID" DataType="Guid" Hidden="true" />
      <FormField FieldID="DESIGNATIONNAME" DataType="String" Hidden="true" />
      <UIActions>
        <UIAction ActionID="DESIGNATIONLINK">
          <ShowPage PageID="...">
            <ActionContext>Fields!DESIGNATIONID</ActionContext>
          </ShowPage>
        </UIAction>
      </UIActions>
    </Fields>
  </Collection>
</FormField>

Then in your UI model you can wire up the caption/label of the action to the name or whatever you want it to be

...
For Each split As ...SPLITSUIModel In Me.SPLITS.Value
  split.DESIGNATIONLINK.Caption = split.DESIGNATIONNAME.Value
Next
...

And in your html you can use a template

<tr id="#MAP#SPLITS_container">
  <td>
    <span id="#MAP#SPLITS_caption" class.. />
  </td>
  <td>
    <table id="#MAP#SPLITS_value">
      <tbody>
        <tr id="#MAP#SPLITS_template">
          <td>
            <a id="#MAP#SPLITS_DESIGNATIONLINK_action" />
          </td>
        </tr>
      </tbody>
    </table>
  </td>
</tr>
answered by danielcooke (3.5k points)
selected by allaterentieva
Thank you, this works perfectly!
One ore question, is there a way to display these links next too each other as opposed to one under the other?
I've never done that before but you could try playing around where you place the template tag to get it to work
...