• BMC Group
  • NEWBIE
  • 30 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 7
    Replies
Hi everyone,
I am getting an error on below mentioned line when compiling in an apex class but it runs in Execute Anonymous Window :

msg.setTreatTargetObjectAsRecipient(false);

Error : Save error: Method does not exist or incorrect signature: [Messaging.SingleEmailMessage].setTreatTargetObjectAsRecipient(Boolean).
Kindly help. Thanks in advance. 
I am trying to deploy a class but the deployment process has stuck in between from last one hour.
How to resolve this problem?

Thanks in advance!
Hi Everyone,

We have to integrate our salesforce CRM with an external android app (Application which is developed by third party). This app is meant to send the notifications to our clients for the overall business process starting from lead generation from the app till the Operations(Custom Object) end on different business logic.

All the communication between the app and CRM will be mostly one way i.e. notify(App Notifications) app for certain status update in the CRM.

We are into a certain scenario where the process will go like this:

1) Lead will be generated from Android Application.
2) From Android Application the Lead information is to be sent to our Salesforce CRM in JSON format by using POST method which will be parsed and then stored into our database and then further process goes on.

So in this case, they(Android application developers) want the entry point of our salesforce server URL where the JSON formatted data packet can be recieved.

I am unaware of the entry point server URL i.e. Which is the entry point server URL in Salesforce CRM for such business process.

I kindly request you all to assist me with the above mentioned scenario. Any help will be highly appreciated.

Awaiting for your response.

Regards,
BMC Group 
Hi Everyone,

Currently as a part of our project we have to integrate Force.com platform with an android application. I do not have any previous experience with integration. Below I have mentioned the business requirement that we want to achieve and the set of questions I want to get answers for.

Business Requirement : 

Our Company, BMC Group is going to launch an android app soon. This app is meant to give the notifications to our clients for the overall business process starting from lead generation from the app till the Operations(Custom Object) end on different business logic.

All the communication between the app and CRM will be mostly one way i.e. notify(App Notifications) app for certain status update in the CRM.

Set of questions : 

1) How to integrate force.com platform with an android app?
2) Which API's should I use? 
3) How Data security can be achieved ?
4) What will be the role of External ID fields?
5) How to notify the app every time when certain status change in CRM? 

As I mentioned earlier I am very new to integrations my basic question will be
How and where I should start with? 

I kindly request you all to assist me with the above mentioned scenario. Also I will need the code samples so that I can understand how to code for the same. Any help would be highly appreciated.

Awaiting for your response.

Regards,
BMC Group 
 
Hello,
I am not able to retrive newly added class from server in Eclipse workspace.
We, in our organization are working on 3 different machines say A,B,C having different workspace for each single user. All the 3 users are working on a same project and once changes made in the classes is saved to the server by the respective user and the other users retrieve the changes by refreshing from server. Suppose A adds a class and saves it to server, while B and C refreh their workspace from server but only B is able to retrieve that class, while C is not able to retrieve that class.
Any help will be appreciated.
Thanks in advance.
 
Hello Everyone,

As need for our business process we have force.com wesite, custom URL - "bmcgroup.force.com/(VF Pages)". We use to send the desired force.com site links to our clients at the time of lead creation along with the proposals. Then the clients use to click on the links/buttons and the leads get converted into opportunity and our users (Business Development Executives) call up on those opportunities for closing it. Here is the overall business flow mentioned below.

Leads Generation >> Proposal Emails(Clients) >> Links for Force.com site Pages >> Client click on the LinkBusiness logic (ERROR LOCATION)>> Converts Lead into Opportunity.

But from last 7-8 days (Probably After Winter 16 RELEASE)these force.com sites are not working from outside organization. Whenever our cliens use to click on desired buttons/links they are getting an error message as "We are down for maintenance.Sorry for the inconvenience. We'll be back shortly."  All sites were working perfectly fine but suddenly from 7-8 days its not working.

Any help would be highly appreciated.
Thanks in advance.

Our need is to create almost 100 leads taking data from our custom object (Operation__c) of our previous clients on a particular condition at a time along with that a single email and a text message should go to each lead.

I have created one schedulable class which takes required data from Operation__c(Query on operation) of our previous clients and I am inserting leads through this schedulable class and the control then enter into our Lead creation trigger.

It works fine for 10 records creation but on 11th it hits the governer limits and throws a DML exception "TO Many SOQL Queries:101" which is quite obvious because as my single lead creation hits 10 queries(inside my lead creation)....indeed  in a single transaction for 11 records creation 11records * 10queries(More than 100)...EXCEPTION.

Now my question is how can I create bulk leads for my existing clients ?

 

Hi all,
Basically I want to insert values some field values into the respected fields into child object Trademark_Details_ESR__c from the custom Object Trademark_Details__c dynamically for that i have created custom settings TrademarkESRDetails__c.Ihave got all the required values into the esrList but those are not populated after its insertion.
Here is my code.

public with sharing class CreateTrademarkDetailsESRGateway{
    
    public list<Trademark_Details_ESR__c> TMESR=new list<Trademark_Details_ESR__c>();
    public list<Trademark_Details_ESR__c> newESR=new list<Trademark_Details_ESR__c>();
    public String input;
    public Integer index=0;
    public map<Integer,list<TrademarkESRDetails__c>> esrmap=new map<Integer,list<TrademarkESRDetails__c>>();
    
  
    public list<Trademark_Details_ESR__c> esrList = new list<Trademark_Details_ESR__c>();
   
    public void DetailsUpdate(list<Trademark_Details_ESR__c> triggernew){ 
        
        for(Trademark_Details_ESR__c tempTM: triggernew){
            system.Debug('---tempTM--'+tempTM); 
            system.Debug('---tempTM.BMCID__c--'+tempTM.BMCID__c);
            input=tempTM.BMCID__c; 
            system.Debug('---input--'+input);
        } 
       
                
        if(input!= null){
            system.Debug('---input--'+input);
            list<Trademark_Details__c>  tmrRecords = [Select id,Application_Date__c,Application_No__c,Application_Status__c,
                                                       Brand_Name__c,   Class_No__c,Contact_Email__c,Contact_Name__c,
                                                       Contact_Phone__c,Operation_Name__c,oid__c,User_Date__c,name
                                                       From 
                                                       Trademark_Details__c
                                                       Where
                                                       oid__c =: input AND Application_Status__c='Objected'];   
        
            system.debug('-tmrRecords-' + tmrRecords);
            getESRDetails(tmrRecords);
         }
      
            
   }
  
  
   public void getESRDetails(list<Trademark_Details__c> tmrRecords1){
    
   try{
        system.debug('---TMRRecords1'+TMRRecords1);
        system.debug('---TMRRecords1.size()---'+TMRRecords1.size());
        system.debug('--- TrademarkESRDetails__c.getAll()-'+ TrademarkESRDetails__c.getAll());
        system.debug('--- TrademarkESRDetails__c.getAll().Values()---'+ TrademarkESRDetails__c.getAll().Values());
        
        list<TrademarkESRDetails__c> lst = [Select ESR_Field_API_Name__c,TM_Field_API_Name__c,List_Size__c from TrademarkESRDetails__c];
        system.debug('---lst'+lst);
        
        for(TrademarkESRDetails__c  temp : TrademarkESRDetails__c.getAll().Values()) {
            system.debug('---temp---'+temp);
            system.debug('---temp.List_Size__c---'+integer.valueof(temp.List_Size__c));
                if(esrMap.containsKey(integer.valueof(temp.List_Size__c))){
                    esrMap.get(integer.valueof(temp.List_Size__c)).add(temp);
                    system.Debug('in IF-esrMap.get(integer.valueof(temp.List_Size__c))-' + esrMap.get(integer.valueof(temp.List_Size__c))); 
                }else{
                     esrMap.put(integer.valueof(temp.List_Size__c), new List<TrademarkESRDetails__c> {temp});
                     system.Debug('in else -esrMap.get(integer.valueof(temp.List_Size__c))-' + esrMap.get(integer.valueof(temp.List_Size__c)));
                }   
        }
        system.debug('-esrMap.size-' + esrMap.size()+'---esrMap---'+esrMap);
        system.debug('---esrmap.get(index)---'+esrMap.get(index));
       
         //sObject s;
         //Trademark_Details_ESR__c esr = (Trademark_Details_ESR__c)s;
        
        
          Trademark_Details_ESR__c esr=new Trademark_Details_ESR__c();
        for(Trademark_Details__c tempTM: tmrRecords1){
            system.debug('---TMRRecords11---'+tempTM );
            //TrademarkESRDetails__c is a custom settings
            
            
            for(TrademarkESRDetails__c customSettings : esrmap.get(index)){
               system.debug('---customSettings--'+customSettings + '-esrmap.get(index)-'+esrmap.get(index));
               esr.put(customSettings.ESR_Field_API_Name__c, tempTM.get(customSettings.TM_Field_API_Name__c));
               system.debug('---esr1--'+esr);
               esrList.add(esr);
            }
           
            index++; 
        }
      
        system.debug('-esrList.size-' + esrList.size()+ '-esrList-' + esrList);
      
       if(esrList.size()>0){
            system.debug('--inside if'+esrList);
            insert esrList;
       }
           
    }catch(Exception e){
        system.debug('---Exception'+e.getmessage());
    }
  }
}

 

Below is my Code. Please assist me why code in red color is not covering. We have a manage pacakge to send SMS to a mobile number.  

 

The Class

public void sendSMSToSir(List<Operation__c> OperationList){
 46	          for(Operation__c srnData&colon; operationList){
 47	              if((recordTypeMap.get(srnData.RecordTypeid) == 'LLP')
 48	                 ||(recordTypeMap.get(srnData.RecordTypeid) == 'Public')
 49	                 ||(recordTypeMap.get(srnData.RecordTypeid) == 'Private')) {
 50	                  if(recordTypeMap.get(srnData.RecordTypeid) == 'LLP'){
 51	                      CompanyExtention ='LLP';
 52	                  }else if (recordTypeMap.get(srnData.RecordTypeid) == 'Public'){
 53	                      CompanyExtention ='Ltd.';       
 54	                  }else if(recordTypeMap.get(srnData.RecordTypeid) == 'Private') {
 55	                      CompanyExtention ='Pvt. Ltd.';
 56	                  }
 57	                  
 58	                  System.Debug('--- current status---'+ srnData.Current_Status__c);
 59	                  if(srnData.Current_Status__c == 'Name Appln Filed'){
 60	                      if(srnData.Service_Segment__c == 'LLP Registration'){
 61	                          System.Debug('--- SRN Details of LLP Form 1 and its msg---');
 62	                          msg ='ROC Name- '+srnData.ROC_1st_Name__c+'\r\nForm 1\r\nSRN No.- '+srnData.Form_1A_1_SRN__c+'\r\n'+srnData.Company_Name_First_Option__c+' '+ CompanyExtention+'\r\nFiling Date- '+srnData.Form_1A_1_Date__c;
 63	                          sendSMS(sirMobile,msg);
 64	                      }else if(srnData.Service_Segment__c=='Company Registration'){
 65	                          System.Debug('--- SRN Details of Form 1A Comp Registration and its msg---');
 66	                          msg ='ROC Name- '+srnData.ROC_1st_Name__c+'\r\nForm 1A \r\nSRN No.- '+srnData.Form_1A_1_SRN__c+'\r\n'+srnData.Company_Name_First_Option__c+' '+CompanyExtention+'\r\nFiling Date- '+srnData.Form_1A_1_Date__c;
 67	                          sendSMS(sirMobile,msg);
 68	                      }

 test class is entering in if and else if but not reaching to 'msg' variable and sendSMS(sirMobile, msg) of the above code

 

 Here is the trigger from where the above code is calling

 

  for(Operation__c tempOpp : trigger.new){
        System.debug('New company Name( Tin)--'+trigger.isInsert+'--(tiA)--'+trigger.isAfter+'-(tiB)--'+trigger.isBefore+'-(tiU)--'+ trigger.isUpdate+'---'+ tempOpp.New_Company_name__c+'---'+tempOpp.Form_1A_1_SRN__c+'---'+ tempOpp.Incorporation_SRN__c );
            
            if(tempOpp.Current_Status__c == 'Name Appln Filed'
                || tempOpp.Current_Status__c =='Name Resubmission'
                || tempOpp.Current_Status__c== 'Incorporation Filed'
                || tempOpp.Current_Status__c =='Incorporation Resubmission'){       
                If((trigger.isBefore
                    || trigger.isUpdate
                    || trigger.isAfter)
                    && ( trigger.oldMap.get(tempOpp.id).current_status__c != trigger.newMap.get(tempOpp.id).current_status__c)){
                    System.debug('--Current Status---'+ trigger.oldMap.get(tempOpp.id).current_status__c +'!='+ trigger.newMap.get(tempOpp.id).current_status__c) ;    
                    SRNDetails SRN = new SRNDetails(); 
                    SRN.newRecordsOfSRN(trigger.new); 
                    SRN.sendSMSToSir(trigger.new);
                }
            }
        } 

 Here is my test class

 

tempOperation.get(0).current_status__c = ' Name Appln Filed';
                tempOperation.get(0).Company_Name_First_Option__c= 'First Option';
                tempOperation.get(0).Form_1A_1_SRN__c = 'V564789321';
                tempOperation.get(0).Form_1A_1_Date__c = date.parse('04/07/2013');
                tempOperation.get(0).ROC_Name__c='Andhra Pradesh -- Andhra Pradesh';
                update tempOperation;
                
                SRNDetails SRNRecords = new SRNDetails();
                SRNRecords.newRecordsOfSRN(tempOperation);
                SRNRecords.sendSMSToSir(tempOperation);
                
                tempOperation.get(0).current_status__c = ' Name Resubmission';
                tempOperation.get(0).Company_Name_First_Option__c= 'Second Option';
                tempOperation.get(0).Form_1A_1_SRN__c = 'V564789321';
                tempOperation.get(0).Form_1A_1_Date__c = date.parse('04/07/2013');
                tempOperation.get(0).ROC_Name__c='Andhra Pradesh -- Andhra Pradesh';
                update tempOperation;
                System.Debug('---List contain UT2(1)---'+ tempOperation);
                SRNDetails SRNRecords1 = new SRNDetails();
                SRNRecords1.newRecordsOfSRN(tempOperation);
                SRNRecords1.sendSMSToSir(tempOperation);

 Please help me and thanks in anticipation.

 

Regards

 

Rohit

Please let me know how can I insert my company logo in visualforce page, email redirects.

Hello Everyone,

As need for our business process we have force.com wesite, custom URL - "bmcgroup.force.com/(VF Pages)". We use to send the desired force.com site links to our clients at the time of lead creation along with the proposals. Then the clients use to click on the links/buttons and the leads get converted into opportunity and our users (Business Development Executives) call up on those opportunities for closing it. Here is the overall business flow mentioned below.

Leads Generation >> Proposal Emails(Clients) >> Links for Force.com site Pages >> Client click on the LinkBusiness logic (ERROR LOCATION)>> Converts Lead into Opportunity.

But from last 7-8 days (Probably After Winter 16 RELEASE)these force.com sites are not working from outside organization. Whenever our cliens use to click on desired buttons/links they are getting an error message as "We are down for maintenance.Sorry for the inconvenience. We'll be back shortly."  All sites were working perfectly fine but suddenly from 7-8 days its not working.

Any help would be highly appreciated.
Thanks in advance.
Hi everyone,
I am getting an error on below mentioned line when compiling in an apex class but it runs in Execute Anonymous Window :

msg.setTreatTargetObjectAsRecipient(false);

Error : Save error: Method does not exist or incorrect signature: [Messaging.SingleEmailMessage].setTreatTargetObjectAsRecipient(Boolean).
Kindly help. Thanks in advance. 
Hi Everyone,

Currently as a part of our project we have to integrate Force.com platform with an android application. I do not have any previous experience with integration. Below I have mentioned the business requirement that we want to achieve and the set of questions I want to get answers for.

Business Requirement : 

Our Company, BMC Group is going to launch an android app soon. This app is meant to give the notifications to our clients for the overall business process starting from lead generation from the app till the Operations(Custom Object) end on different business logic.

All the communication between the app and CRM will be mostly one way i.e. notify(App Notifications) app for certain status update in the CRM.

Set of questions : 

1) How to integrate force.com platform with an android app?
2) Which API's should I use? 
3) How Data security can be achieved ?
4) What will be the role of External ID fields?
5) How to notify the app every time when certain status change in CRM? 

As I mentioned earlier I am very new to integrations my basic question will be
How and where I should start with? 

I kindly request you all to assist me with the above mentioned scenario. Also I will need the code samples so that I can understand how to code for the same. Any help would be highly appreciated.

Awaiting for your response.

Regards,
BMC Group 
 
Hello Everyone,

As need for our business process we have force.com wesite, custom URL - "bmcgroup.force.com/(VF Pages)". We use to send the desired force.com site links to our clients at the time of lead creation along with the proposals. Then the clients use to click on the links/buttons and the leads get converted into opportunity and our users (Business Development Executives) call up on those opportunities for closing it. Here is the overall business flow mentioned below.

Leads Generation >> Proposal Emails(Clients) >> Links for Force.com site Pages >> Client click on the LinkBusiness logic (ERROR LOCATION)>> Converts Lead into Opportunity.

But from last 7-8 days (Probably After Winter 16 RELEASE)these force.com sites are not working from outside organization. Whenever our cliens use to click on desired buttons/links they are getting an error message as "We are down for maintenance.Sorry for the inconvenience. We'll be back shortly."  All sites were working perfectly fine but suddenly from 7-8 days its not working.

Any help would be highly appreciated.
Thanks in advance.

Our need is to create almost 100 leads taking data from our custom object (Operation__c) of our previous clients on a particular condition at a time along with that a single email and a text message should go to each lead.

I have created one schedulable class which takes required data from Operation__c(Query on operation) of our previous clients and I am inserting leads through this schedulable class and the control then enter into our Lead creation trigger.

It works fine for 10 records creation but on 11th it hits the governer limits and throws a DML exception "TO Many SOQL Queries:101" which is quite obvious because as my single lead creation hits 10 queries(inside my lead creation)....indeed  in a single transaction for 11 records creation 11records * 10queries(More than 100)...EXCEPTION.

Now my question is how can I create bulk leads for my existing clients ?

 

Hi all,
Basically I want to insert values some field values into the respected fields into child object Trademark_Details_ESR__c from the custom Object Trademark_Details__c dynamically for that i have created custom settings TrademarkESRDetails__c.Ihave got all the required values into the esrList but those are not populated after its insertion.
Here is my code.

public with sharing class CreateTrademarkDetailsESRGateway{
    
    public list<Trademark_Details_ESR__c> TMESR=new list<Trademark_Details_ESR__c>();
    public list<Trademark_Details_ESR__c> newESR=new list<Trademark_Details_ESR__c>();
    public String input;
    public Integer index=0;
    public map<Integer,list<TrademarkESRDetails__c>> esrmap=new map<Integer,list<TrademarkESRDetails__c>>();
    
  
    public list<Trademark_Details_ESR__c> esrList = new list<Trademark_Details_ESR__c>();
   
    public void DetailsUpdate(list<Trademark_Details_ESR__c> triggernew){ 
        
        for(Trademark_Details_ESR__c tempTM: triggernew){
            system.Debug('---tempTM--'+tempTM); 
            system.Debug('---tempTM.BMCID__c--'+tempTM.BMCID__c);
            input=tempTM.BMCID__c; 
            system.Debug('---input--'+input);
        } 
       
                
        if(input!= null){
            system.Debug('---input--'+input);
            list<Trademark_Details__c>  tmrRecords = [Select id,Application_Date__c,Application_No__c,Application_Status__c,
                                                       Brand_Name__c,   Class_No__c,Contact_Email__c,Contact_Name__c,
                                                       Contact_Phone__c,Operation_Name__c,oid__c,User_Date__c,name
                                                       From 
                                                       Trademark_Details__c
                                                       Where
                                                       oid__c =: input AND Application_Status__c='Objected'];   
        
            system.debug('-tmrRecords-' + tmrRecords);
            getESRDetails(tmrRecords);
         }
      
            
   }
  
  
   public void getESRDetails(list<Trademark_Details__c> tmrRecords1){
    
   try{
        system.debug('---TMRRecords1'+TMRRecords1);
        system.debug('---TMRRecords1.size()---'+TMRRecords1.size());
        system.debug('--- TrademarkESRDetails__c.getAll()-'+ TrademarkESRDetails__c.getAll());
        system.debug('--- TrademarkESRDetails__c.getAll().Values()---'+ TrademarkESRDetails__c.getAll().Values());
        
        list<TrademarkESRDetails__c> lst = [Select ESR_Field_API_Name__c,TM_Field_API_Name__c,List_Size__c from TrademarkESRDetails__c];
        system.debug('---lst'+lst);
        
        for(TrademarkESRDetails__c  temp : TrademarkESRDetails__c.getAll().Values()) {
            system.debug('---temp---'+temp);
            system.debug('---temp.List_Size__c---'+integer.valueof(temp.List_Size__c));
                if(esrMap.containsKey(integer.valueof(temp.List_Size__c))){
                    esrMap.get(integer.valueof(temp.List_Size__c)).add(temp);
                    system.Debug('in IF-esrMap.get(integer.valueof(temp.List_Size__c))-' + esrMap.get(integer.valueof(temp.List_Size__c))); 
                }else{
                     esrMap.put(integer.valueof(temp.List_Size__c), new List<TrademarkESRDetails__c> {temp});
                     system.Debug('in else -esrMap.get(integer.valueof(temp.List_Size__c))-' + esrMap.get(integer.valueof(temp.List_Size__c)));
                }   
        }
        system.debug('-esrMap.size-' + esrMap.size()+'---esrMap---'+esrMap);
        system.debug('---esrmap.get(index)---'+esrMap.get(index));
       
         //sObject s;
         //Trademark_Details_ESR__c esr = (Trademark_Details_ESR__c)s;
        
        
          Trademark_Details_ESR__c esr=new Trademark_Details_ESR__c();
        for(Trademark_Details__c tempTM: tmrRecords1){
            system.debug('---TMRRecords11---'+tempTM );
            //TrademarkESRDetails__c is a custom settings
            
            
            for(TrademarkESRDetails__c customSettings : esrmap.get(index)){
               system.debug('---customSettings--'+customSettings + '-esrmap.get(index)-'+esrmap.get(index));
               esr.put(customSettings.ESR_Field_API_Name__c, tempTM.get(customSettings.TM_Field_API_Name__c));
               system.debug('---esr1--'+esr);
               esrList.add(esr);
            }
           
            index++; 
        }
      
        system.debug('-esrList.size-' + esrList.size()+ '-esrList-' + esrList);
      
       if(esrList.size()>0){
            system.debug('--inside if'+esrList);
            insert esrList;
       }
           
    }catch(Exception e){
        system.debug('---Exception'+e.getmessage());
    }
  }
}

Please let me know how can I insert my company logo in visualforce page, email redirects.