SmartList favorites can be included in the Report List. If you create a new SmartList object, consider making the favorites for that object available in the Report List. You will do this in the code that adds reports to a Report List. Refer to Report Lists for more information about adding to a Report List.
For example, the following code is part of the procedure that adds to the Report List for the sample integrating application. This code makes favorites for the new Leads SmartList object available in the Report List.
{SmartList Favorite} clear field RptData; RptData:'Report Type' = REPORTTYPE_SMARTLISTFAVORITE; RptData:'Product ID' = IG_PROD_ID; RptData:'Report Series DictID' = IG_PROD_ID; RptData:'Report Series ID' = 1; RptData:'Report ID' = SMARTLIST_OBJECTTYPE_LEADS; RptData:'Report Option Name' = ""; RptData:'VisibleTo' = SMARTLIST_VISIBLETO_SYSTEM; status = AddReport(RptData) of form syReportList;
By default, SmartList objects you create will be listed with the “3rd Party” series assigned to them. To have the SmartList items assigned to a different series, you must create a procedure trigger for the GetSmartListObjectSeries procedure of the syReportList form. The following example shows this trigger from the sample integrating application.
l_result = Trigger_RegisterProcedure(script GetSmartListObjectSeries of form syReportList, TRIGGER_AFTER_ORIGINAL, script SmartList_GetObjectSeries); if l_result <> SY_NOERR then warning "Procedure trigger registration failed."; end if;
The trigger processing procedure examines which SmartList object is being added to the Report List. If it’s the Leads object, the series is set to “Sales”.
in DictID nObjectDictID; in 'Report ID' nObjectID; inout 'Report Series DictID' nSeriesDictID; inout 'Report Series ID' nSeriesID; inout 'Series Name' sSeriesName; if nObjectDictID = IG_PROD_ID then if nObjectID = SMARTLIST_OBJECTTYPE_LEADS then sSeriesName = "Sales"; end if; end if;