• Nethaji Baskar
  • NEWBIE
  • 55 Points
  • Member since 2014
  • Cognizant

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 6
    Replies
Hello,

I'm building a series of department dashboards using VIsualforce pages and the <analytics:reportChart> element.

How do I inline filter my report by Case Owner? My assumption is below, and I've tried several variations. We do not use queues/escalation rules, so I'm hoping that simplifies things.

<analytics:reportChart reportId="[Report ID]" filter="{column:'Case.Owner', operator:'equals', value:'[Name 1],[Name 2],[etc.]'}"></analytics:reportChart>

Thanks for taking a look ^_^

There is problem with my  developer org. A code which is just a copy paste of the code provided in trailhead: Quick start Apex: Add a method to the class. (https://developer.salesforce.com/trailhead/project/quickstart-apex/quickstart-apex-2) is not getting saved.

However we tried this code in my friends org, it got saved and she got the points.User-added image
Hi All,
I am planning to install the Salesforce for Outlook plugin to sync my Emails, Contatcs, Events, Tasks. I am concerned if there will be any performance bottlenecks in my Outlook after installing the Plugin.
Any inputs on the potential performance issues in Salesforce for Oulook Plugin is appreciated.
Can we use Data.com instead of Outlook plugin to achive the above requirements?
Please let me know the inputs and suggestions.
Hello,

I'm building a series of department dashboards using VIsualforce pages and the <analytics:reportChart> element.

How do I inline filter my report by Case Owner? My assumption is below, and I've tried several variations. We do not use queues/escalation rules, so I'm hoping that simplifies things.

<analytics:reportChart reportId="[Report ID]" filter="{column:'Case.Owner', operator:'equals', value:'[Name 1],[Name 2],[etc.]'}"></analytics:reportChart>

Thanks for taking a look ^_^
id customPB = Test.getStandardPricebookId();
            PricebookEntry pbe = new PricebookEntry(pricebook2id = customPB, product2id = p.id,unitprice=1.0,isActive=true);
            insert pbe;
            PricebookEntry pbe2 = new PricebookEntry(pricebook2id = customPB, product2id = p2.id,unitprice=1.0,isActive=true);
            insert pbe2;
            PricebookEntry pbe3 = new PricebookEntry(pricebook2id = customPB, product2id = p3.id,unitprice=1.0,isActive=true);
            insert pbe3;
            quote q=new quote(name='myquote',opportunityid= o1.id,pricebook2id=customPB);
            insert q;
            OpportunityLineItem oli = new OpportunityLineItem(PricebookEntryId=pbe.Id,OpportunityId=o1.Id,Quantity=10,TotalPrice=100);
            //QuoteLineItem  testSPTqli = new QuoteLineItem(Description ='1 Year', PricebookEntryId=pbe.id, QuoteId=q.id, UnitPrice = 1, Quantity = 10);    
            //insert testSPTqli;
            OpportunityLineItem oli2 = new OpportunityLineItem(PricebookEntryId=pbe2.Id,OpportunityId=o1.Id,Quantity=10,TotalPrice=100);
            OpportunityLineItem oli3 = new OpportunityLineItem(PricebookEntryId=pbe3.Id,OpportunityId=o1.Id,Quantity=10,TotalPrice=100);


            QuoteLineItem  testSPTqli1 = new QuoteLineItem(Description ='2 Year', PricebookEntryId=pbe.id, QuoteId=q.id, UnitPrice = 1, Quantity = 10, Internet_Service_Fee_CheckBox__c = true , Enter_Activation__c = 10.00 ,Activation_Fee_CheckBox__c = true);    
            insert testSPTqli1;
            QuoteLineItem  testSPTqli2 = new QuoteLineItem(Description ='1 Year', PricebookEntryId=pbe2.id, QuoteId=q.id, UnitPrice = 1, Quantity = 10, Internet_Service_Fee_CheckBox__c = true,Enter_Activation__c = NULL ,Activation_Fee_CheckBox__c = true);    
            insert testSPTqli2;
            QuoteLineItem  testSPTqli3 = new QuoteLineItem(Description ='3 Year', PricebookEntryId=pbe3.id, QuoteId=q.id, UnitPrice = 1, Quantity = 10 , Internet_Service_Fee_CheckBox__c = true,Enter_Activation__c = 10.00,Activation_Fee_CheckBox__c = true);    
            insert testSPTqli3;

              ApexPages.StandardController sc = new ApexPages.StandardController(q);

              PageReference pageRef = Page.QuotePDF;
              pageRef.getParameters().put('id', String.valueOf(q.Id));
              Test.setCurrentPage(pageRef);
            
            OppExt oppExt = new OppExt(sc);

            Integer intSvcTerm;
            intSvcTerm = 12;

            Integer voiceSvcTerm;
            voiceSvcTerm = 0;
            Test.stopTest();

Code to be covered
 
if (qli.Enter_Activation__c != NULL ){
                    qli.Activation_Fee_CheckBox__c = true;

                }
                    voiceHwLineItems.add(qli);
                    System.debug('I am the' +  qli);
                }
                //add the voice related ones to the voice service section
                else{
                    //only save the term if this is for the main voice service
                    if(voiceSvcTerm == 0){
                        if(qli.Description.contains('1 Year'))
                            voiceSvcTerm = 12;
                        else if(qli.Description.contains('2 Year'))
                            voiceSvcTerm = 24;
                        else if(qli.Description.contains('3 Year'))
                            voiceSvcTerm = 36;
                        System.debug('Setting Internet Term to ' + voiceSvcTerm);
                    }
                    
                    if(voiceSvcTerm == 0
                        && prd.ProductCode == 'Service'
                        && prd.Term__c != null
                        && qli.Description.contains('Extension')){
                        System.debug('Setting Voice Term to ' + prd.Term__c);
                        voiceSvcTerm = Integer.valueOf(prd.Term__c);
                    }
                    if(prd.ProductCode == 'Service'
                        && voiceSvcLineItems.size() > 0){


                     if (qli.Enter_Activation__c != NULL ){
                         qli.Activation_Fee_CheckBox__c = true;
                    }
                        voiceSvcLineItems.add(0, qli);
                    }
                    else voiceSvcLineItems.add(qli);
                }
            }
        }


 

There is problem with my  developer org. A code which is just a copy paste of the code provided in trailhead: Quick start Apex: Add a method to the class. (https://developer.salesforce.com/trailhead/project/quickstart-apex/quickstart-apex-2) is not getting saved.

However we tried this code in my friends org, it got saved and she got the points.User-added image
Need test class for the following trigger with atleast 75 code coverage 
Trigger 1
The below trigger  : Lead and Contact have same checkbox fields, both object fields should have same value 
trigger checktheLeadCheckBox on Contact (after update) 
{
  for(Contact c : Trigger.New)
  {
    List<Lead> li = [select Id, Customer_of_PubKCyber__c,Email,Customer_of_PubKLaw__c from Lead where Email =: c.Email AND IsConverted =: false]; 
    for(Lead l : li)
    {
     If(l.Id != null)
     { 
       l.Customer_of_PubKCyber__c=c.Customer_of_PubKCyber__c;
       l.Customer_of_PubKLaw__c = c.Customer_of_PubKLaw__c;
       update l;
     }
    }
  }
}
Trigger 2 
The below trigger : checking the value of the checkboxes on Contacts object based on a condition 
trigger updatecontactcheckbox on Opportunity (after insert, after update) 
{    
    for(Opportunity o : Trigger.New)
    {
  
     if( o.Contact__c != null)                 
     {      
       Contact c = [select Id, Customer_of_PubKCyber__c,Email,Customer_of_PubKLaw__c from Contact where Id =: o.Contact__c ]; 
       
if((o.Subscription_Start_Date__c <= System.Today()) && (o.Subscription_End_Date__c >= System.Today()) && (o.Product_Name__c == 'PubKCyber Newsletter'))
    {
         c.Customer_of_PubKCyber__c = True;
        
    }
    else if(o.Product_Name__c == 'PubKCyber Newsletter')
         { 
           c .Customer_of_PubKCyber__c = false;
           
         }
          
if((o.Subscription_Start_Date__c <= System.Today()) && (o.Subscription_End_Date__c >= System.Today()) && (o.Product_Name__c == 'PubKLaw Newsletter'))
        { 
          c.Customer_of_PubKLaw__c= True;
         
        }
       else if(o.Product_Name__c == 'PubKLaw Newsletter')
         { 
           c.Customer_of_PubKLaw__c = false;            
         }
       update c; 
      }   
     }  
  }

Please give me the test class to cover 75 of code coverage to migration.......Very Critical
Please give me the test class to cover 75 of code coverage to migration.......Very Critical
Hi All,
I am planning to install the Salesforce for Outlook plugin to sync my Emails, Contatcs, Events, Tasks. I am concerned if there will be any performance bottlenecks in my Outlook after installing the Plugin.
Any inputs on the potential performance issues in Salesforce for Oulook Plugin is appreciated.
Can we use Data.com instead of Outlook plugin to achive the above requirements?
Please let me know the inputs and suggestions.