SWEPersonalizationGotoview
Many of us have used “SWEPersonalizationGotoview” function during our projects. In my current project I came across an interesting requirement for the application home page/landing page. The requirement was to display count of open activities for the logged in user on application home page and when user clicks on that count he should be navigated to the My activities view and only open activities should be displayed in that. But when user directly clicks on My activities view he should see all records.
There could be multiple ways to achieve this but idea which we implemented is to use “GetNumBCRows” to count number of records and “SWEPersonalizationGotoview” function in the personalization rule to go to destination view. The challenge here was to restrict the records while navigating from home page to My Activities view on click of count. The catch here is to set some profile attribute on click and based on its value to apply filter on “My Activities” View. After some analysis I found that “SWEPersonalizationGotoview” is defined in “swecommon_top.js” file under “\Siebel\8.0\web client\PUBLIC\enu\20405\SCRIPTS” directory. I modified “SWEPersonalizationGotoview” function to set the profile attribute whenever user clicked on count. This Profile attribute was used to control searchspec in “My Activities” view using personalization rules and was reset using runtime event “ViewActivated” back to null.
It gave me immense ease to dynamically control the filter criteria without having multiple My Activities view. Probably it will also benefit other readers in projects to implement such scenarios.
There could be multiple ways to achieve this but idea which we implemented is to use “GetNumBCRows” to count number of records and “SWEPersonalizationGotoview” function in the personalization rule to go to destination view. The challenge here was to restrict the records while navigating from home page to My Activities view on click of count. The catch here is to set some profile attribute on click and based on its value to apply filter on “My Activities” View. After some analysis I found that “SWEPersonalizationGotoview” is defined in “swecommon_top.js” file under “
It gave me immense ease to dynamically control the filter criteria without having multiple My Activities view. Probably it will also benefit other readers in projects to implement such scenarios.
תגובות
הוסף רשומת תגובה