• SBN
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 22
    Replies
Hi,

I created a Summary report and grouped by "Exchange_Number__c". I added a Custom formulae below.

IF(ISNULL(Contact.Exchange_Number__c), RowCount, NULL)

The formulae is returning the row count even though there is value in  "Exchange Number" field. I want to show the row count only when there is no value stored in "Exchange_Number__c" field .

Can anyone look at the above formulae and let me know whats wrong in this.

Thanks
  • April 22, 2014
  • Like
  • 0
Hi ,

I have an custom object which saves the Zip codes of the contact records and has a Lookup relation to contact object.

I have a requirement to integrate the google maps on Salesforce Dashboard and show the total number of contacts by Zip code?Is it possible?

Thanks
  • April 21, 2014
  • Like
  • 0
Hi,

Is it possible to hide only the "App set up" from all the users( Include admins) and see both Personal setup and Adminsitrative setup in salesforce  . What would be the security settings for that profile?


Thanks
  • March 10, 2014
  • Like
  • 0
Hi,

I have a requirement to hide the existing custom apex code in our production org from all the users( including sys admins).

Is there any vaible solution?

Thanks
  • March 05, 2014
  • Like
  • 1
Hi,

I have few questions regarding the Managed Packages

Beta Managed Package
1) Can we install the beta managed package in the production org which is a enterprise edition?

2) If yes, then what are the disadvantages if we install it in Production org?

Release Managed Package

1) Can we bypass the Appexchange upload of the app an install the Released managed package in Production org using the URL link?

2) If yes, still do we need to go through all the security reviews for the app?

3) Can we push the patches to the production org using the Released managed package even if the app doesnt have the security review?

Please let me know if anyone has any idea on this

Thanks

  • February 25, 2014
  • Like
  • 0
Hi ,
I have a Apex Trigger which invokes a Apex class  on a Staging table and process the Lead JSON strings and Upserts the leads in Lead table and  links the lead to a Campaign.

This is My Apex class

public class IWS_Utility{

    public static void processLeadStage(List<Lead_Stage__c> lstLeadStage){
   
        Map<Id,Contact> mapExistingContacts = new Map<Id,Contact>();
        Map<String,IWS_Utility.contactDetails> mapContactsToProcess = new Map<String,IWS_Utility.contactDetails>();
        List<Contact_Roles__c> lstContactRoles = new List<Contact_Roles__c>();
        list<IWS_Utility.contactDetails> newContacts = new List<IWS_Utility.contactDetails>() ;  
        map< string, ID >  Campaignname2campaignid = new Map< string, ID >();
        List<CampaignMember> cmcheck = new List<CampaignMember>();
        Set<string> emailIds = new Set<string>() ;
        Set<datetime> messagetimestamp = new Set<datetime>() ;
        Set<string> nonMatchingEmails = new Set<string>() ;

       
        for ( Lead_Stage__c ImportRec : lstLeadStage )
        {
            if(!ImportRec.isProcessed__c){
                ImportRec.isProcessed__c= true;
                IWS_Utility.contactDetails e = IWS_Utility.parseContactFeedItem ( ImportRec.dataContent__c ) ;
                if (e!= NULL) {
                    newContacts.add(e) ;
                    mapContactsToProcess.put(e.emailAddress,e);
                    emailIds.add(e.emailAddress);
                   // messagetimestamp.add(ImportRec.messageTimestamp__c);
                }
            }
        }      
     
      list<CampaignMember> CMs = [
    SELECT id,CampaignId,Campaign.Name from CampaignMember] ;
       
        for ( CampaignMember cmitem : CMs ) {    
          
         
      Campaignname2campaignid.put(cmitem.Campaign.Name,cmitem.Campaignid);   
    
      }
       id Campid =  Campaignname2campaignid.get('Lead Gen Campaign') ;
       system.debug('the camp id is'+ Campid );
       
        List<Contact> lstContacts = [Select Id,AccountId,Email,FirstName,LastName,Phone,(Select Id from Contact_Roles__r where Contact_Role__c = 'Individual Insurance Lead'),(Select Id from CampaignMembers) from Contact where Email In:emailIds limit 1000];
        List<Contact> lstContacts2Update = new List<Contact>();
       
        for(Contact c: lstContacts)
        {
            if(emailIds.contains(c.Email)){
                System.debug('contact exists');
                if(c.FirstName==null || c.Phone==null)
                {
                    if(c.FirstName==null)
                        c.FirstName = mapContactsToProcess.get(c.Email).firstName;
                    if(c.Phone == null)
                        c.Phone = mapContactsToProcess.get(c.Email).phoneNumber;
                    if(c.MailingPostalCode  == null)
                        c.MailingPostalCode = mapContactsToProcess.get(c.Email).zipCode;       
                    lstContacts2Update.add(c); 
                }
                if(c.Contact_Roles__r.size()==0)               
                {
                    lstContactRoles.add(new Contact_Roles__c(Contact__c=c.Id,Account__c=c.Accountid,Contact_Role__c = 'Individual Insurance Lead'));
                }
                if(c.CampaignMembers.size()==0)
                    cmcheck.add(new CampaignMember(ContactId=c.Id,CampaignId =Campid,Status='Responded'));
                    emailIds.remove(c.Email);
            }
        }
       
        List<Lead> lstUpdateLeads = new List<Lead>();       
           
        Database.DMLOptions dmo = new Database.DMLOptions();
        dmo.assignmentRuleHeader.useDefaultRule= true;
       
        for(Lead  l : [Select Id,Email,FirstName,LastName,Phone,(Select Id from CampaignMembers where CampaignId =:Campid ) from Lead where Email In:emailIds]){
            
            if(emailIds.contains(l.Email))
            {
                l.FirstName = mapContactsToProcess.get(l.Email).firstName;
                l.LastName = mapContactsToProcess.get(l.Email).lastName;
                l.Phone = mapContactsToProcess.get(l.Email).phoneNumber;
                l.company =l.FirstName+''+l.LastName ;
                l.postalcode = mapContactsToProcess.get(l.Email).zipCode;
                l.setOptions(dmo);
                lstUpdateLeads.add(l);
                if(l.CampaignMembers.size()==0)
                {
                    cmcheck.add(new CampaignMember(LeadId=l.Id,CampaignId =Campid,Status='Responded'));
                }
                emailIds.remove(l.Email);
            }
        }
       
        List<Lead> lstNewLeads = new List<Lead>();       
      
       
        for(String emailId: emailIds)
        {
            IWS_Utility.contactDetails feedCon = mapContactsToProcess.get(emailId);
            lstNewLeads.add(new Lead(EMail=emailId,Firstname=feedCon.firstName,Phone=feedCon.phoneNumber,postalcode=feedCon.zipCode,LastName=feedCon.LastName,company=feedCon.firstName+' '+feedCon.LastName,LeadSource ='Web'));
        }
       
         for(lead l : lstNewLeads)
           l.setOptions(dmo);
       
        if(lstContacts2Update.size()>0)
            update lstContacts2Update;

        if(lstContactRoles.size()>0)
            insert lstContactRoles;

        if(lstUpdateLeads.size()>0)
            update lstUpdateLeads;
           
        if(lstNewLeads.size()>0){
            insert lstNewLeads;
             system.debug('the camp id is 1'+ Campid );
            for(lead l : lstNewLeads)
                cmcheck.add(new CampaignMember(LeadId=l.Id,CampaignId =Campid,Status='Responded'));
            }
             system.debug(' size is '+ cmcheck.size());
        if(cmcheck.size()>0)
            insert cmcheck;    
    }

    public static contactDetails parseContactFeedItem ( string jsonEnrollmentString ) {
       
        JSONParser parser = JSON.createParser(jsonEnrollmentString);
        contactDetails sr ;

        while (parser.nextToken() != null)
        {
            sr = (contactDetails)parser.readValueAs(contactDetails.class);
        }
        return(sr) ;
    }
   

    public class contactDetails {
       
        public string lastName      {get; set;}
        public string firstName     {get; set;}
        public string emailAddress  {get{return emailAddress.toLowerCase();} set;}
        public string phoneNumber   {get; set;}
        public string zipCode       {get; set;}
    }
   

   

and My Test Class is

@isTest
private class web2lead_test {
    static testMethod void web2lead() {      
    
  Campaign testCampaign;  

   testCampaign = new Campaign(name = 'Lead Gen Campaign');            
  
     Lead a1 = new Lead (
      LastName = 'test1',
      Phone ='1234567890',
      Email = ‘testing@gmail.com’) ;
     insert a1 ;       

   
    Lead L = new Lead (
      FirstName = 'Lead',
      LastName = 'test',
      Company = 'abcde',      
      email = 'testing3@gmail.com' ) ;
     insert L ;
   
     Lead L1 = new Lead (
      FirstName = 'Lead',
      LastName = 'test',
      Company = 'abcd',      
      email = 'testing4@gmail.com' ) ;
     insert L1 ;     
    
  
    CampaignMemberStatus status1 = new CampaignMemberStatus(
        CampaignID = testCampaign.id ,
        Label = 'Responded',
        SortOrder = 2);     
   insert status1 ;  

List<Lead_Stage__c> Leadstagerecord = new List<Lead_Stage__c>() ;
  
    Lead_Stage__c importRecord = new Lead_Stage__c(dataContent__c = '{"firstName":"Teddy","lastName":"Roosevelt","emailAddress":"ro@os.ev","phoneNumber":"","zipCode":"11215"}');
   
    
    Leadstagerecord.add(importRecord) ;
  
   /* Lead_Stage__c importRecord1 = new Lead_Stage__c(dataContent__c = '{"firstName":"Teddy","lastName":"Roosevelt","emailAddress":"ro@os.ev","phoneNumber":"","zipCode":"11215"}');
  
    
    Leadstagerecord.add(importRecord1) ;
 
     Lead_Stage__c importRecord2 = new Lead_Stage__c(dataContent__c = '{"firstName":"Teddy","lastName":"Roosevelt","emailAddress":"testing2@gmail.com","phoneNumber":"1234567890","zipCode":"11215"}');
  
    
     Leadstagerecord.add(importRecord2) ;
 
     Lead_Stage__c importRecord3 = new Lead_Stage__c(dataContent__c = '{"firstName":"Teddy","lastName":"Roosevelt","emailAddress":"testing4@gmail.com","phoneNumber":"","zipCode":"11215"}');
  
    
      Leadstagerecord.add(importRecord3) ;

   Test.startTest();
    insert Leadstagerecord ;
  
    Test.stopTest();

If I run the above test Its throwing an error :

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, IWS_Code.processleadFeedItems: execution of BeforeInsert

caused by: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Attempted to add a campaign member where either the member id '00Qi000000Gtb1T' or the campaign id 'null' is null.: []

Class.IWS_Code.IWS_Utility.processLeadStage: line 122, column 1


Can Anyone help me out on this?

Thanks
  • February 21, 2014
  • Like
  • 0
Hi,

While creating the Managed package, if we add the Apex classes/triggers to the package,does the custom fields/custom objects refered in the apex classes/triggers  will be added automatically to the package? if Yes, is there any way to remove those depdenices from the package before I upload the package?

Thanks

  • February 18, 2014
  • Like
  • 0
Hi ,

I have a trigger on a Contact object which converts the Leads( If exists) by matching the Email id to a contact if a new contact is inserted into the Contact Object.

The issue is, some of the Leads in the database doesn't have the email id so the trigger didnt convert lead to contact instead created a new contact. For  future records I can change the code to match by Phone Number or Name but for the exisitng Leads and contacts, What would be the best procedure to convert the exisitng leads to the exisiting contacts by matching the Phone Number/Name.

Thanks
  • February 04, 2014
  • Like
  • 0

Hi,

 

I have a requirement to schedule a report to 20 users at a time every week. Could anyone tell me what is the limitation on the total number of email notifications that can be sent for a scheduled report at a time.

 

Thanks

 

  • December 11, 2013
  • Like
  • 0

Hi ,

 

I have a requirement just to send an email notification every day to a particular user.I have implemented this using schedular apex class, but

 

I am not recievieng any emails at the scheduled time.Here is my code:

 

 

Global class Schedularclass implements Schedulable{
global void execute (SchedulableContext SC){
 {   
 Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
  mail.setTemplateId('00Xi0000000ViBZ'); //email template id
  String[]   toAddresses = new String[]{'mygmailid@gmail.com'}; 

mail.setToAddresses(toAddresses);
 Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
}
}
}

 

Please let me know if anyone has any idea on this.

 

Thanks

SN

  • November 22, 2013
  • Like
  • 0

Hello,

 


I have a requriement to send a couple of users daily an email notification and include some of the salesforce report URLs in that email text body to view.

 

Is there any standard fucntionality in salesforce to just send email notifications to Users? Or Do we need to write the schedular apex to do this task?

 

Thanks

  • November 21, 2013
  • Like
  • 0

 

Hi,

 

I was trying to query the data from my production org in Jitter bit. I have changed the URL of my production org from" login.salesforce.com" to my company domain URL. Jitter bit now throwing some fatal error. It worked before when the URL was "login.salesforce.com". 

I have also given the company domain URL in Jitter bit while connecting to salesforce. Its connecting successfully but still the query function throwing the same error. 

I am using Jitter Bit basic version

 

Thanks

  • October 03, 2013
  • Like
  • 0

Hi,

 

I am trying to create a Workflow to send email alert when Article is Published. I am selecting the below Evaluation and Rule criteria

 

 created, and every time it’s edited

 

and

 

Publishing Status Equals to 'Published'

 

but I am not recieveing email when I published the Article . Do any one have any thoughts about this?

 

Thanks

 

 

  • August 27, 2013
  • Like
  • 0

Hi,

 

I could able to only create 3 active Data Category Groups for Knowledgse Base in a sandbox? Is there any way that I can have more category Groups created ? Is there any reason on this Limitation?

 

Thanks

  • August 18, 2013
  • Like
  • 0

Hi,

 

Is there any way to import the bulk Data Categories in Knowledgse base through any tool?  Or the manual creating is the only Option

 

Thanks

  • August 16, 2013
  • Like
  • 0

Hi,

 

Does any one know about the Knowledge base search functionality and how does it look up the keywords from the case subject line.

 

Is there any way to customize the search function on the Articles tab?? 

 

 

Thanks

 

  • August 13, 2013
  • Like
  • 0

Hi,

 

Is it possible to have a bulk update of all the knowledge base articles . I tried to do with Data loader but couldnt update. 

 

 

 The only way is to manually going over each article and update them?? or do we have any other option??

 

 

Thanks

 

  • August 03, 2013
  • Like
  • 0

Hi,

 

while  trying to Import the CSV file into the salesforce sandbox through data loader into article types

 

1) I couldnt map the data category group during mapping ( I mean there is no such field shows up in data loader in order to map the column in the file from the article type object). So how to get the salesforce data category field in the data loader fromt he article type object?

 

2) By referecing the below link, it was mentioned that only HTML file path needs to be provided into the rich text editor fields in the articles while importing, but i could import the raw text. Does this happen only in Developer sandbox or in production too ?

 

http://na7.salesforce.com/help/doc/en/knowledge_article_importer_02csv.htm

 

Thanks

  • July 31, 2013
  • Like
  • 0

Hi,

 

while  trying to Import the CSV file into the salesforce sandbox through data loader into article types

 

1) I couldnt map the data category group during mapping ( I mean there is no such field shows up in data loader in order to map the column in the file from the article type object). So how to get the salesforce data category field in the data loader fromt he article type object?

 

2) By referecing the below link, it was mentioned that only HTML file path needs to be provided into the rich text editor fields in the articles while importing, but i could import the raw text. Does this happen only in Developer sandbox or in production too ?

 

http://na7.salesforce.com/help/doc/en/knowledge_article_importer_02csv.htm

 

Thanks

  • July 31, 2013
  • Like
  • 0

Hi,

 

I have a requirement to process the records (which have same data) based on the latest timestamp from the staging table.

 

Could any one tell me the SOQL query to retrieve the records based on the latest timestamp?

 

Thanks

  • July 01, 2013
  • Like
  • 0
Hi,

I have a requirement to hide the existing custom apex code in our production org from all the users( including sys admins).

Is there any vaible solution?

Thanks
  • March 05, 2014
  • Like
  • 1
Hi,

I created a Summary report and grouped by "Exchange_Number__c". I added a Custom formulae below.

IF(ISNULL(Contact.Exchange_Number__c), RowCount, NULL)

The formulae is returning the row count even though there is value in  "Exchange Number" field. I want to show the row count only when there is no value stored in "Exchange_Number__c" field .

Can anyone look at the above formulae and let me know whats wrong in this.

Thanks
  • April 22, 2014
  • Like
  • 0
Hi ,

I have an custom object which saves the Zip codes of the contact records and has a Lookup relation to contact object.

I have a requirement to integrate the google maps on Salesforce Dashboard and show the total number of contacts by Zip code?Is it possible?

Thanks
  • April 21, 2014
  • Like
  • 0
Hi,

Is it possible to hide only the "App set up" from all the users( Include admins) and see both Personal setup and Adminsitrative setup in salesforce  . What would be the security settings for that profile?


Thanks
  • March 10, 2014
  • Like
  • 0
Hi,

I have a requirement to hide the existing custom apex code in our production org from all the users( including sys admins).

Is there any vaible solution?

Thanks
  • March 05, 2014
  • Like
  • 1
Hi ,

I have a trigger on a Contact object which converts the Leads( If exists) by matching the Email id to a contact if a new contact is inserted into the Contact Object.

The issue is, some of the Leads in the database doesn't have the email id so the trigger didnt convert lead to contact instead created a new contact. For  future records I can change the code to match by Phone Number or Name but for the exisitng Leads and contacts, What would be the best procedure to convert the exisitng leads to the exisiting contacts by matching the Phone Number/Name.

Thanks
  • February 04, 2014
  • Like
  • 0

Hello,

 


I have a requriement to send a couple of users daily an email notification and include some of the salesforce report URLs in that email text body to view.

 

Is there any standard fucntionality in salesforce to just send email notifications to Users? Or Do we need to write the schedular apex to do this task?

 

Thanks

  • November 21, 2013
  • Like
  • 0

 

Hi,

 

I was trying to query the data from my production org in Jitter bit. I have changed the URL of my production org from" login.salesforce.com" to my company domain URL. Jitter bit now throwing some fatal error. It worked before when the URL was "login.salesforce.com". 

I have also given the company domain URL in Jitter bit while connecting to salesforce. Its connecting successfully but still the query function throwing the same error. 

I am using Jitter Bit basic version

 

Thanks

  • October 03, 2013
  • Like
  • 0

Hi,

 

I am trying to create a Workflow to send email alert when Article is Published. I am selecting the below Evaluation and Rule criteria

 

 created, and every time it’s edited

 

and

 

Publishing Status Equals to 'Published'

 

but I am not recieveing email when I published the Article . Do any one have any thoughts about this?

 

Thanks

 

 

  • August 27, 2013
  • Like
  • 0

Hi,

 

I need a validation rule where the "Account Owner" Field can  be changed by System Admin and one of the user. All other users should not be allowed to change the Account Owner of the Account Record.

 

I have tried with the below valdiation rule, but its not working.

 

AND(ISCHANGED(OwnerId), $User.Id != '005i0000000DrUE',  $Profile.Name = 'System Administrator' )

 

Anyone have any suggestions??

 

Thanks

 

 

 

 

  • May 30, 2013
  • Like
  • 0

Hi,

 

Could any one tell me the cost for the knowledge user license/user/year for the Enterprise Edition.

 

Thanks

  • May 29, 2013
  • Like
  • 0

Hi,

 

Our company have a requirement to display the Knowledge base articles on our company website whenever the website visitors search for the articles.

 

I know that we have Public Knowledge Base feature where we need to construct the salesforce website in order to display the articles for website visitors, but can we integrate the knowledge base articles with my company website ( not using the native salesforce website)?

 

Does the Knowledge base supports  IFrame? if not can anyone suggest me with the Knowledge Base Integration  Options with the  websites?

 

Thank you

 

 

  • May 28, 2013
  • Like
  • 0

Hi,

 

I have a requirement to provide  Option Analysis between knowledge base and solutions.

 

Anybody have any suggestions on this? please let me know

  • May 03, 2013
  • Like
  • 0

I want to add person account to campaign as campaign member using apex, but was not able to find out  the way to pass account id in campaign member object.

 

I  got the "FIELD_INTEGRITY_EXCEPTION, Contact ID: id value of incorrect type: 001P000000XhJYkIAN: [ContactId]" error.

 

DO I need to use "Personcontactid" to pass instead of contact id from account object ?

 

 

 



  • April 16, 2013
  • Like
  • 0

I'm trying to send an automatic email with Schedule Apex Code. Still learning Apex. The class seems to complile fine:

 

Global class SendOpenCasesEmail_CompanyX implements Schedulable{

global void execute (SchedulableContext SC){

 {   
 Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
  mail.setTargetObjectId('0035000000d0APT'); //email recipient id
  mail.setTemplateId('00X500000013ngY'); //email template id
  String[] bccaddress = new String[]{'paulmac106@gmail.com'};
  mail.setBccAddresses(bccaddress);
  mail.setWhatID('0015000000KJImA'); //account id (show cases for this account)
 Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
}
}
}

 

But when the sceduler tries to run the job I get this email:

 

Apex script unhandled exception by user/organization: 00550000001Esxxx/00D500000007xxx

 

Scheduled job 'SendVal' threw unhandled exception.

 

caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, java.lang.NullPointerException: Argument Error: Parameter value is null: []

 

Class.SendOpenCasesEmail_CompanyX.execute: line 12, column 2 External entry point

 

Any help with what I'm doing wrong would be greatly appreciated.

 

thanks!!

 

  • September 02, 2010
  • Like
  • 0