tag:blogger.com,1999:blog-3501681045442312793.post2398602437282448018..comments2023-11-05T03:39:28.708-08:00Comments on Eternus Solutions: Navigation made easy with Lead NotifierEternus Solutionshttp://www.blogger.com/profile/09488171827447335023noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-3501681045442312793.post-59406643909815701222015-04-24T14:17:28.025-07:002015-04-24T14:17:28.025-07:00That was it. Thank you so much for the help and id...That was it. Thank you so much for the help and idea.Anonymoushttps://www.blogger.com/profile/05890082766096518736noreply@blogger.comtag:blogger.com,1999:blog-3501681045442312793.post-11269084365829239662015-04-24T12:00:46.944-07:002015-04-24T12:00:46.944-07:00@nalec7 you are missing the "AND OwnerId = :U...@nalec7 you are missing the "AND OwnerId = :Userinfo.getUserId()" in your query.Anonymoushttps://www.blogger.com/profile/07455271515004694233noreply@blogger.comtag:blogger.com,1999:blog-3501681045442312793.post-89374966468162367262015-04-24T09:44:50.080-07:002015-04-24T09:44:50.080-07:00Getting an error b/c I'm not sure how to updat...Getting an error b/c I'm not sure how to update with your new code.<br /><br /><br /> // Refresh number of leads<br /> public PageReference leadCountAutoRefresh() {<br /> countValue = getOpenLeadsCount();<br /> return null;<br /> }<br /> <br /> // Returns number of leads with status Open<br /> private Integer getOpenLeadsCount() {<br /> return [Select COUNT()From Lead Where Status = 'Open' Userinfo.getUserId()];<br /> <br /> }<br />}//LeadCountNotifierController ends Anonymoushttps://www.blogger.com/profile/05890082766096518736noreply@blogger.comtag:blogger.com,1999:blog-3501681045442312793.post-7275578475930067452015-04-24T09:43:52.404-07:002015-04-24T09:43:52.404-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/05890082766096518736noreply@blogger.comtag:blogger.com,1999:blog-3501681045442312793.post-71907956882843547242015-04-23T08:10:54.627-07:002015-04-23T08:10:54.627-07:00Chris, assuming that the Lead's Owner field va...Chris, assuming that the Lead's Owner field value is set to the Logged in User and the Org Wide Default setting for Lead n your Salesforce instance is set to Private you will not need to do anything explicit. The existing code will get you the Open leads in the context of the logged in User. <br /><br />However, if the mentioned settings don't hold true then modify the query from the getOpenLeadsCount() to "Select COUNT() From Lead Where Status ='Open' And OwnerId = Userinfo.getUserId() ". Let me know if that helps !Anonymoushttps://www.blogger.com/profile/07455271515004694233noreply@blogger.comtag:blogger.com,1999:blog-3501681045442312793.post-58907576999132298452015-04-22T20:58:14.832-07:002015-04-22T20:58:14.832-07:00Jigar - I came across your lead notifier blog pos...Jigar - I came across your lead notifier blog post. Very good information.<br /><br />One question I had was, what might be needed to only show the leads open by logged user?<br /><br />Sale rep 1 logs, it would show his leads only. Sales rep 2 logs in and shows his leads, etc.<br /><br />Any input would be helpful.<br />Anonymoushttps://www.blogger.com/profile/05890082766096518736noreply@blogger.com