Products A-Z All Services Can't find what you're looking for? Chat Live!
Products A-Z Can't find what you're looking for? Chat Live!
Can't find what you're looking for? Chat Live!
Hello all,
I want to create a custom part to pull newly added Class Notes into a small scrolling section on a page.What is the best way to access this info in the custom part?Should I use the RE web service, or is there a way to pull this info directly from BBNC that I'm missing?
Thanks,George
I'd use the API here is some code that might get you started! Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim RE7 As REAPI = initAPI() Dim mosc As IBBSessionContext Dim oClass As New Blackbaud.PIA.RE7.BBREAPI.CRecord 'Class Record Dim notes As Blackbaud.PIA.RE7.BBREAPI.IBBNotepadsAPI 'Notes for the class Dim note As Blackbaud.PIA.RE7.BBREAPI.IBBNotepad If Not RE7 Is Nothing Then Dim dTable As New DataTable("Notes") Dim dRow As DataRow dTable.Columns.Add("Note") dTable.Columns.Add("Date") mosc = DirectCast(RE7.SessionContext, IBBSessionContext) With oClass .Init(mosc) .Load(284353, True) 'id of a class, readonlly = true notes = .Notepads 'pop the notes for the class For Each note In notes If CType(note.Fields(ENotepadFields.NOTEPAD_fld_NotepadDate), Date).AddDays(30) >= Date.Today Then 'this will just get all notes in the last 30 days and then add it to a datatable dRow = dTable.NewRow() dRow.Item("Note") = note.Fields(ENotepadFields.NOTEPAD_fld_ActualNotes) dRow.Item("Date") = note.Fields(ENotepadFields.NOTEPAD_fld_NotepadDate) dTable.Rows.Add(dRow) End If Next DataGridView1.DataSource = dTable End With End If End Sub