• AMalena
  • NEWBIE
  • 0 Points
  • Member since 2011
  • Salesforce Architect & Administrator
  • Market Traders Institute, Inc.


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

Per Standard Suport's directive to me this week, I am posting this HERE to get fields Indexed.  Why Support would make me talk to the Developer's Community to get Support to index my fields?  I have no clue.

These are all Date fields.  I cannot mark them Unique External IDs.


Webinar Attendance     Case 10812794
https://help.salesforce.com/apex/HTViewCase?id=5003000000V5gLwAAJ
INDEX:
Registration_Date__c
Workable_Opp_Date__c
Join_Time__c
Leave_Time__c


Lead Sources     Case 10812807
https://help.salesforce.com/apex/HTViewCase?id=5003000000V5gPoAAJ
INDEX:
ead_Source_Date__c
Cake_Conversion_Date__c
Override_Date__c (not specifically a problem yet, but anticipated in the future to be)


(Person) Account     Case 10802220
https://help.salesforce.com/htviewcase?id=5003000000V4wjaAAB
INDEX:
Webinar_UTP_First_Attd__c
Webinar_UTP_Latest_Attd__c
Webinar_UOC_First_Attd__pc
Webinar_UOC_Latest_Attd__pc


(Exact Target) InidividualEmailResult     (ET) Case 01156464
ref:_00D00hftv._500A0MEwr9:ref
INDEX:
--all Date fields--


 

I'm still a fledgling Apex man right now.  I am trying to use a modified set of code from the following URL, but even the pre-existing code does not work llwhen deployed due to the error listed.

 

http://www.salesforce.com/docs/developer/cookbook/Content/apex_dedupe.htm

 

trigger leadDuplicatePreventer on Lead(before insert, before update) {

    Map<String, Lead> leadMap = new Map<String, Lead>();

for (Lead lead : System.Trigger.new) { // Make sure we don't treat an email address that // isn't changing during an update as a duplicate. if ((lead.Email != null) && (System.Trigger.isInsert || (lead.Email != System.Trigger.oldMap.get(lead.Id).Email))) { // Make sure another new lead isn't also a duplicate if (leadMap.containsKey(lead.Email)) { lead.Email.addError('Another new lead has the ' + 'same email address.'); } else { leadMap.put(lead.Email, lead); } } } // Using a single database query, find all the leads in // the database that have the same email address as any // of the leads being inserted or updated. for (Lead lead : [SELECT Email FROM Lead WHERE Email IN :leadMap.KeySet()]) { Lead newLead = leadMap.get(lead.Email); newLead.Email.addError('A lead with this email ' + 'address already exists.'); } }

 

Error:  Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, leadDuplicatePreventer: execution of BeforeInsert caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact sales...

 

As much as I can write code and alter existing triggers, and as much as I keep reading this is "simply" a problem with not using an Indexed field, I have no clue what to do.  I've tried adding a Select to the MAP statement with a WHERE that references either Email or Name, but it doesn't help - same error.

 

Help?

Can somone tell me what I'm missing here?   :-/   Just trying to write data back to the Account.  Surrounding THIS for loop is an Opportunity for-loop, if that matters.  :-/  

 

 

                        for ( Account AccountRec : [Select Id, Name, Last_PhoneCall_Attempt__c from Account where Id = :OpportunityRec.AccountId] )
                        {
                            OpportunityRec.Name = AccountRec.Id;  // returns the RIGHT ID...
                            AccountRec.Name = 'TonyBaloney';      // does NOT reset Name on Account to this value..!
                            AccountRec.Last_PhoneCall_Attempt__c = Date.Today();    // same issue...
                        }
                        OpportunityRec.Last_PhoneCall_Attempt__c = Date.Today();

All I want to do is record a date onto the Account record when a Task is created of Activity Type "Phone Call", that's it.  Unfortunately my experience level with Trigger programming is very low still and my workload is killing my efforts to go through the video training on our Premier support plan.

Anyone have a simple trigger mechanism that will do this?  I could probably write 80% of it, but the actual opening-and-linking to the Task and Account databases is my issue.  Stamping the date after verifying the Activity Type is a no-brainer.   :-/    I can't seem to find a good resource of Trigger code samples on the web.

Thanks for any help anyone can give...   I've been pretty sidetracked with tasks today, and threw together the below code in text editor which I am sure is not complete/correct yet, just as a reference.  :-/

 

 

trigger PiggybackTriggerTasks on Task (after insert) {

    List<Task> listTask = new List<Task>();
    List<Id> listAccountId = new List<Id>();

    if ( trigger.isInsert ) {

        for(Task thisTask: trigger.new) {

            if ( thisTask.Activity_Type__c == 'Phone Call' ) { listAccountId.add(thisTask.What); }

        }

        Account objAccount = mapIdAccount.get(thisAccountId);

        thisAccount.Last_PhoneCall_Activity__c = thisTask.ActivityDate

    }

}

Per Standard Suport's directive to me this week, I am posting this HERE to get fields Indexed.  Why Support would make me talk to the Developer's Community to get Support to index my fields?  I have no clue.

These are all Date fields.  I cannot mark them Unique External IDs.


Webinar Attendance     Case 10812794
https://help.salesforce.com/apex/HTViewCase?id=5003000000V5gLwAAJ
INDEX:
Registration_Date__c
Workable_Opp_Date__c
Join_Time__c
Leave_Time__c


Lead Sources     Case 10812807
https://help.salesforce.com/apex/HTViewCase?id=5003000000V5gPoAAJ
INDEX:
ead_Source_Date__c
Cake_Conversion_Date__c
Override_Date__c (not specifically a problem yet, but anticipated in the future to be)


(Person) Account     Case 10802220
https://help.salesforce.com/htviewcase?id=5003000000V4wjaAAB
INDEX:
Webinar_UTP_First_Attd__c
Webinar_UTP_Latest_Attd__c
Webinar_UOC_First_Attd__pc
Webinar_UOC_Latest_Attd__pc


(Exact Target) InidividualEmailResult     (ET) Case 01156464
ref:_00D00hftv._500A0MEwr9:ref
INDEX:
--all Date fields--


 

Can we create standard sfdc reports on Chatter feeds? 

I'm still a fledgling Apex man right now.  I am trying to use a modified set of code from the following URL, but even the pre-existing code does not work llwhen deployed due to the error listed.

 

http://www.salesforce.com/docs/developer/cookbook/Content/apex_dedupe.htm

 

trigger leadDuplicatePreventer on Lead(before insert, before update) {

    Map<String, Lead> leadMap = new Map<String, Lead>();

for (Lead lead : System.Trigger.new) { // Make sure we don't treat an email address that // isn't changing during an update as a duplicate. if ((lead.Email != null) && (System.Trigger.isInsert || (lead.Email != System.Trigger.oldMap.get(lead.Id).Email))) { // Make sure another new lead isn't also a duplicate if (leadMap.containsKey(lead.Email)) { lead.Email.addError('Another new lead has the ' + 'same email address.'); } else { leadMap.put(lead.Email, lead); } } } // Using a single database query, find all the leads in // the database that have the same email address as any // of the leads being inserted or updated. for (Lead lead : [SELECT Email FROM Lead WHERE Email IN :leadMap.KeySet()]) { Lead newLead = leadMap.get(lead.Email); newLead.Email.addError('A lead with this email ' + 'address already exists.'); } }

 

Error:  Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, leadDuplicatePreventer: execution of BeforeInsert caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact sales...

 

As much as I can write code and alter existing triggers, and as much as I keep reading this is "simply" a problem with not using an Indexed field, I have no clue what to do.  I've tried adding a Select to the MAP statement with a WHERE that references either Email or Name, but it doesn't help - same error.

 

Help?

Hello folks,

 

I hope you all are doing well.

Can anyone tell me that what is the difference between aloha app and native app of salesforce ?

Can anyone tell me what feature salesforce is giving in force.com various editions.

 

Thanks,

Minkesh Patel

Can somone tell me what I'm missing here?   :-/   Just trying to write data back to the Account.  Surrounding THIS for loop is an Opportunity for-loop, if that matters.  :-/  

 

 

                        for ( Account AccountRec : [Select Id, Name, Last_PhoneCall_Attempt__c from Account where Id = :OpportunityRec.AccountId] )
                        {
                            OpportunityRec.Name = AccountRec.Id;  // returns the RIGHT ID...
                            AccountRec.Name = 'TonyBaloney';      // does NOT reset Name on Account to this value..!
                            AccountRec.Last_PhoneCall_Attempt__c = Date.Today();    // same issue...
                        }
                        OpportunityRec.Last_PhoneCall_Attempt__c = Date.Today();

All I want to do is record a date onto the Account record when a Task is created of Activity Type "Phone Call", that's it.  Unfortunately my experience level with Trigger programming is very low still and my workload is killing my efforts to go through the video training on our Premier support plan.

Anyone have a simple trigger mechanism that will do this?  I could probably write 80% of it, but the actual opening-and-linking to the Task and Account databases is my issue.  Stamping the date after verifying the Activity Type is a no-brainer.   :-/    I can't seem to find a good resource of Trigger code samples on the web.

Thanks for any help anyone can give...   I've been pretty sidetracked with tasks today, and threw together the below code in text editor which I am sure is not complete/correct yet, just as a reference.  :-/

 

 

trigger PiggybackTriggerTasks on Task (after insert) {

    List<Task> listTask = new List<Task>();
    List<Id> listAccountId = new List<Id>();

    if ( trigger.isInsert ) {

        for(Task thisTask: trigger.new) {

            if ( thisTask.Activity_Type__c == 'Phone Call' ) { listAccountId.add(thisTask.What); }

        }

        Account objAccount = mapIdAccount.get(thisAccountId);

        thisAccount.Last_PhoneCall_Activity__c = thisTask.ActivityDate

    }

}

Hello,

 

I understand that there are limits on a Professional Edition that can be increased/removed for an Aloha App. In the documentation, it states:

 

========================================================

Apps/Objects/Tabs Limit Immunity

All salesforce.com editions have limits that restrict the number of apps, objects, and tabs that can be used. Normally this limit would be a problem if your prospective customer is already using their entire allotment of apps, objects, or tabs, but there exists a special permission that allows your app to be exempt from those limits. This means your app can be installed into any org without worrying about the normal app, object, or tab limits. To be sure, there are additional limits that will still be in effect, but they are listed here in documentation. For instance, if you have any custom objects with more than 100 custom fields, or you have more than 50 custom record types, your app will not install in GE or PE.

========================================================

 

Does this mean that if our app is certified as an Aloha App that we can request a higher limit for custom fields? It suggests about that each object can have 100 fields

 

Thanks in advance!

 --Sarah Andrews

Hi All,

 

Im beginning to learn Apex, so bare with me! ive been faced with a curly one to start me off with learning Apex and i am a little stuck already. Here is the situation:

 

* 2 objects involved - Customer Satisfaction Index (will call it CSI here on in) and Tasks.

* On the CSI object, there are a number of Tasks that need to be completed by the Account Owner. These tasks are created via workflow from the CSI Object and are therefore Tasks

* What i require is a COUNT of all the Tasks that have the status as "Completed" relating to that CSI to be displayed in the field Completed_Tasks_c on the CSI object.

 

Im having trouble with the COUNT part of it displaying in the Completed Tasks field.

 

Any help? Thanking you all in advance.

 

Cheers

 

Hi there,

 

I have setup Email-to-Case as a Service in my EE org.  It was easy to setup and works great -- as long as the Case Owner remembers to select the appropriate "From" address upon clicking the Send an Email button on the Emails related list.  If the Case Owner forgets, the email comes directly from them and the case contact's reply to that email does not get attached to the Case.

 

Is it possible to specify a default email address for a given User?  In this situation, I want to default the Email to Case Address for users who will be managing cases.  I can see where this default may not be desireable when sending Emails from other objects, but I think it makes sense for Cases.

 

Is there a different way of going about this?  The related list is not customizable so it does not appear I can do a custom button.

 

Thanks for your help.

 

Kristin

Are there plans in the road map to allow custom fields on the OpportunityLineItemSchedule object?

In my case, a client would like to add another Quantity-type (double) field onto the OpportunityLineItemSchedule object.

Thanks.