Welcome to Forums Sign in | Join | Help | Forums
in Search


Adding notes to an Action

Last post 08-20-2007 8:37 PM by Fergal O'donnell. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-20-2007 7:15 PM

    Adding notes to an Action

    How can manage the notes on an action?

    I want to be able to iterate through (and edit) all notes associated with the action!

    I can access the first note in the collection using the following below.

    Thanks


    Dim actionID As Integer = 1234
    Dim oAction As New CAction()
    Try
    oAction.Init(sc)
    oAction.Load(actionID)
    oAction.ReadOnlyMode = False
    oAction.Fields(EACTIONFields.ACTION_fld_NOTES) = "My Note"
    oAction.Fields(EACTIONFields.ACTION_fld_NOTEPAD_DESCRIPTION) = "My Note Description"

    oAction.Save()
    Finally
    If oAction IsNot Nothing Then
    oAction.CloseDown()
    End If
    End Try
    Filed under: ,
  • 08-20-2007 7:53 PM In reply to

    • Garrett Keating
    • Top 150 Contributor
    • User Since: 2006
    • Posts 63
    • Organization: U.S. Naval Academy Alumni Association
    • Products:  Blackbaud NetCommunity, The Financial Edge, The Information Edge, The Raiser's Edge

    Adding notes to an Action

    You'd need to create some kind of collection of all of the ID's first. I use datasets/datatables usually. Then do a FOR loop around your code and load each one, make the change and then save. so like dim i as integer for i = 0 to ids.length oAction.Load(ids(i)) 'other code here Next good luck! post again if you get stuck! Garrett Keating Web Developer United States Naval Academy Alumni Association & Foundation www.usna.com
    Garrett Keating
    Senior Web Developer
    U.S. Naval Academy Alumni Association and Foundation
    www.usna.com
    customizingNetCommunity.com
  • 08-20-2007 8:14 PM In reply to

    Adding notes to an Action

    Sorry for the confusion. What I want to do is iterate through the collection of notes on a single action, not iterate through a collection of actions. I am able to add multiple notes to an action from the RE Application but I cannot figure out how to access\edit this collection from the API. On other high level objects such as the CRecord Class there is a collection called Notepads which contains the collection of notes. The CAction Class does not appear to have this collection. [i]--- Edited at 8/20/2007 8:18:31 PM by Fergal O'donnell[/i]
  • 08-20-2007 8:24 PM In reply to

    • Peter Falconer
    • Top 500 Contributor
    • Posts 36
    • Organization: Oxfam Australia
    • Products:  The Raiser's Edge

    Adding notes to an Action

    You need to use IBBAction2 and IBBNotePad eg dim oAct2 as IBBAction2, oNote as IBBNotePad, oAct as CAction ... ... oAct.Load (1) set oAct2 = oAct for each oNote in oAct2.Notepads next
  • 08-20-2007 8:37 PM In reply to

    Adding notes to an Action

    Thanks Peter! That appears to have worked perfectly.
Page 1 of 1 (5 items)