AnsweredAssumed Answered

BB Api Available Announcements not loading properly

Question asked by cr35016 on Jan 19, 2017



We have custom announcements B2 that exports all available announcements for a user to an external server for our in house mobile app. When I run the function for certain users it doesn't seem to return all of the announcements that user can see in their UI. The function is AnnouncementDbLoader.loadAvailableByUserId(Id userId).


The following lines are pulled from the announcements database.


pk1 end_date subject text_format_type start_date crsmain_pk1 permanent_ind users_pk1 announcement_type show_on_login show_on_courses push_notify order_num subject_color last_sms_date last_t2v_date dtcreated dtmodified


93692 NULL Info on 601 A5 pick up and final grades H 2016-12-20 08:51:42.103 38545 Y 92975 C N N N 2 #000000 NULL NULL 2016-12-20 08:51:42.103 2016-12-20 08:51:42.103


96852 NULL Winter 2017 / Business Communications H 2017-01-11 20:11:16.517 43771 Y 33857 C N N N 1 #000000 NULL NULL 2017-01-11 20:11:16.517 2017-01-11 20:11:16.517



When I call that function on a user who belongs to the the second announcement(96582) I do not get that announcement returned. Even though the course and announcement are available and the users can see that announcement in Blackboard.


The first announcement does show up, even though it has nearly all the same data as the first in the db.


Any ideas why this might be occurring?


Coincidentally if I run AnnouncementDbLoader.loadUnavailableByUserId(Id userId), I get the missing announcement.


Am I just using these functions incorrectly?