• kevincar64
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies

Hi everybody,

 

Is it possible to build a filter on a lead view where a lead is *not* a member of a queue?

 

I know you can filter on leads being a member of a queue, but I don't see how I can filter leads on the negative case.

 

In my particular case, I have a queue of leads that are basically "trouble" items... I'm assigning them to a "trouble queue" just fine, but I only want certain ppl to be able to view this particular group of leads.

 

 

Any help is appreciated.

 

 

I'm in a little bit of a jam.

I need to find all the IDs of Leads that have duplicate emails.

In SQL it would be something like

 

SELECT ID, Email from Lead where Email IN (SELECT Email from Lead HAVING COUNT(Id) > 1)

 

Does anyone know ho I can do this?

 

Many thanks for any suggestions.

 

 

Hi,

 

I scheduled a simple little "Hello Word" app that does a System.debug("Hello World") -- The scheduling returns fine, but the job never shows up in the "All Scheduled Jobs" list and the class never seems to fire (a debug log isn't produced).  I'm running as sys admin with Author Apex enabled - Any help is appreciated.

 

Class:

 

global class HelloWorld implements Schedulable {
 
    global void execute(SchedulableContext ctx) {
        System.debug('Hello World');
        }
}

 I executed the code below in the developer console:

 

APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
Execute Anonymous: public class HWScheduler {
Execute Anonymous:    public void HWScheduler() {}
Execute Anonymous:    public  void start() {
Execute Anonymous:      HelloWorld hw = new HelloWorld();
Execute Anonymous:      String sch = '0 15 13 3 * ? 2012';
Execute Anonymous:      System.schedule('B Hello Test',   sch, hw);
Execute Anonymous:      }
Execute Anonymous:    }
14:54:35.065 (65716000)|EXECUTION_STARTED
14:54:35.065 (65727000)|CODE_UNIT_STARTED|[EXTERNAL]|execute_anonymous_apex
14:54:35.066 (66237000)|STATEMENT_EXECUTE|[1]
14:54:35.066 (66246000)|STATEMENT_EXECUTE|[1]
14:54:35.343 (66282000)|CUMULATIVE_LIMIT_USAGE
14:54:35.343|CUMULATIVE_LIMIT_USAGE_END

14:54:35.066 (66295000)|CODE_UNIT_FINISHED|execute_anonymous_apex
14:54:35.066 (66301000)|EXECUTION_FINISHED

I'm missing something fundamental - I need to get the Owner, Number of Leads, and the role description of the lead owners on a single  SOQL statement.  I'm trying the following:

 

SELECT Lead.Owner.Alias,Owner.Id, Lead.Owner.UserRoleId,
Lead.Owner.UserRoleId.Name,  Count(Id)
 FROM Lead  
 WHERE Lead.Owner.IsActive = TRUE
 AND IsUnreadByOwner = True
 GROUP BY Lead.Owner.Alias, Lead.Owner.Id, Lead.Owner.UserRoleId, Lead.Owner.UserRoleId.Name
 HAVING Count(Id) < 25
 ORDER BY Lead.Owner.Alias ASC
LIMIT 45

 ...but I get

INVALID_FIELD:
ERROR at Row:2:Column:1 Didn't understand relationship 'UserRoleId' in field path.

 If I don't try to return "Lead.Owner.UserRoleId.Name" it works fine... which I'm thinking is because I'm mixing child-to-parent and parent-to-child, but I thought that since I already grabbed Lead.Owner.UserRoleId successfully I could also get the name.

 Is there any way to do this?

Thanks in advance

 KC64


Hi all,

 

I'm missing something fundamental - I need to get the Owner, Number of Leads, and the role description of the lead owners on an SOQL statement.  I'm trying the following:

 

SELECT Lead.Owner.Alias,Owner.Id, Lead.Owner.UserRoleId,
Lead.Owner.UserRoleId.Name,  Count(Id)
 FROM Lead  
 WHERE Lead.Owner.IsActive = TRUE
 AND IsUnreadByOwner = True
 GROUP BY Lead.Owner.Alias, Lead.Owner.Id, Lead.Owner.UserRoleId, Lead.Owner.UserRoleId.Name
 HAVING Count(Id) < 25
 ORDER BY Lead.Owner.Alias ASC
LIMIT 45

 

...but I get

INVALID_FIELD:
ERROR at Row:2:Column:1 Didn't understand relationship 'UserRoleId' in field path.

 

If I don't try to return "Lead.Owner.UserRoleId.Name" it works fine... which I'm thinking is because I'm mixing child-to-parent and parent-to-child, but I thought that since I already grabbed Lead.Owner.UserRoleId successfully I could also get the name.

 

Is there any way to do this?

 

Thanks in advance

 

KC64

I'm in a little bit of a jam.

I need to find all the IDs of Leads that have duplicate emails.

In SQL it would be something like

 

SELECT ID, Email from Lead where Email IN (SELECT Email from Lead HAVING COUNT(Id) > 1)

 

Does anyone know ho I can do this?

 

Many thanks for any suggestions.

 

 

 

Hi team,
I defined a custom link on a lead page, with the idea of popping up  a timer page.
I defined the link as onclick javascript&colon;
< script type="text/javascript">

    window.open ("https://na4.salesforce.com/apex/ApexClock","mywindow","menubar=0,resizable=1,width=350,height=250");

< /script>

...And the ApexClock is just a simple system-clock display:
< apex:page id="thePage" showHeader="false">

< html>

< body>

< center>

< div id="clock"></div> < /center> < br/>

< div align="right"> < button onclick="int=window.clearInterval(int);" id="stop">Stop Clock</button>

< /div>

< /body>

< script type="text/javascript">

var int = self.setInterval("clock()",1000); function clock()  {    

var d=new Date();    

var t=d.toLocaleTimeString();    

document.getElementById("clock").innerHTML = "<B>" + t + "</B>"; }

< /script>

< /html>

< /apex:page>

... I know I shouldn't  hard-code the server name - I'll fix that, but the  popup doesnt show, and I know popup blockers are disabled.
Anyone know what I'm doing wrong?  Any help is appreciated.

KC

I'm missing something fundamental - I need to get the Owner, Number of Leads, and the role description of the lead owners on a single  SOQL statement.  I'm trying the following:

 

SELECT Lead.Owner.Alias,Owner.Id, Lead.Owner.UserRoleId,
Lead.Owner.UserRoleId.Name,  Count(Id)
 FROM Lead  
 WHERE Lead.Owner.IsActive = TRUE
 AND IsUnreadByOwner = True
 GROUP BY Lead.Owner.Alias, Lead.Owner.Id, Lead.Owner.UserRoleId, Lead.Owner.UserRoleId.Name
 HAVING Count(Id) < 25
 ORDER BY Lead.Owner.Alias ASC
LIMIT 45

 ...but I get

INVALID_FIELD:
ERROR at Row:2:Column:1 Didn't understand relationship 'UserRoleId' in field path.

 If I don't try to return "Lead.Owner.UserRoleId.Name" it works fine... which I'm thinking is because I'm mixing child-to-parent and parent-to-child, but I thought that since I already grabbed Lead.Owner.UserRoleId successfully I could also get the name.

 Is there any way to do this?

Thanks in advance

 KC64


Hi all,

 

I'm missing something fundamental - I need to get the Owner, Number of Leads, and the role description of the lead owners on an SOQL statement.  I'm trying the following:

 

SELECT Lead.Owner.Alias,Owner.Id, Lead.Owner.UserRoleId,
Lead.Owner.UserRoleId.Name,  Count(Id)
 FROM Lead  
 WHERE Lead.Owner.IsActive = TRUE
 AND IsUnreadByOwner = True
 GROUP BY Lead.Owner.Alias, Lead.Owner.Id, Lead.Owner.UserRoleId, Lead.Owner.UserRoleId.Name
 HAVING Count(Id) < 25
 ORDER BY Lead.Owner.Alias ASC
LIMIT 45

 

...but I get

INVALID_FIELD:
ERROR at Row:2:Column:1 Didn't understand relationship 'UserRoleId' in field path.

 

If I don't try to return "Lead.Owner.UserRoleId.Name" it works fine... which I'm thinking is because I'm mixing child-to-parent and parent-to-child, but I thought that since I already grabbed Lead.Owner.UserRoleId successfully I could also get the name.

 

Is there any way to do this?

 

Thanks in advance

 

KC64