While checking out the DNN API and the database as well, it was found this code pulls an instance of announcements that were only set on Portal 0 (very definitely) but putting in any valid portal id the announcements show up for the portal Id specified.
Note these are all INNER JOINS. I was in the process of writing a SPROC to accomplish what I wanted when it appeared using the Portal Desktop Modules table I could get what I need done.
There must be a DNN API method to propagate anything from Portal 0 to other Announcements modules regardless of child portal. Portal Desktop Modules makes this possible, obviously. I declared the object in C# but can find no calls to do something like update all Announcements modules, nor do so by portal Id. There should be a simple 2-3 lines of code to put in the page load of the Announcements View control to get any announcements on portal 0. how would this be done? I'm missing it.
Checked the Module Settings as well by going into Edit Mode but there isn't a check box or a drop down option to accomplish this. Tried "Get All" from a child portal but no result set.
At least it is known how to get the portal ID and other info to just update the announcements table accordingly if the API method no longer exists but other functionality was left in play on the back end.
The following SQL Code pulls these test announcements:
SELECT TOP (200) * FROM Announcements
As can be seen there are only 2 announcement entries but the following code joining ultimately to announcements and specifying a definite portal shows the same announcements:
SELECT
A.Description
FROM PortalDesktopModules PDM
JOIN DesktopModules DM
ON PDM.DesktopModuleID = DM.DesktopModuleID
JOIN ModuleDefinitions MD
ON MD.DesktopModuleID = DM.DesktopModuleID
JOIN Modules M
ON M.ModuleDefID = MD.ModuleDefID
AND M.ModuleID = 24352
JOIN Announcements A
ON A.ModuleID = M.ModuleID
WHERE PDM.PortalID = 2036
AND DM.DesktopModuleID = 176
To verify I wasn't imagining things I took PDM out of the loop and the following SQL pulls a NULL result set.
SELECT
A.Description
FROM DesktopModules DM
JOIN ModuleDefinitions MD
ON MD.DesktopModuleID = DM.DesktopModuleID
JOIN Modules M
ON M.ModuleDefID = MD.ModuleDefID
AND M.ModuleID = 24352
JOIN Announcements A
ON A.ModuleID = M.ModuleID
WHERE DM.DesktopModuleID = 176
AND M.PortalID = 2036