• Radhe Shyam.
  • NEWBIE
  • 40 Points
  • Member since 2015
  • Sr. Software Engineer
  • Kloudrac Softwares Pvt Ltd


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 15
    Replies
Hello guys,

I am trying to use 3rd party apis in salesforce.
i am very new to these integrtions stuff.

3rd prty provided their code. Now how to use that.
Do i need to create clss or how to do?
Please give me example.

Thanks
 
Hi all,
I want to send sms to mobile number from salesforce.
can anyone help me to guide on way2sms api to implement this.

-Radhe S
Hi Team, I wnt to add one vf component on Home Page layout with one action button.
What are the steps to create this component and to add on Home Page Layout.
Please guide.
I need link this: see the image.
User-added image


-Radhe S
Hello Team, 

I am performing some operations in jQuery where i am making connection with salesforce.
From Salesforce, i am trying to get the records from Account object by passing query from jQuery Code.

Problem is: I am getting only 2000 records. But i need all records.

How to do this, please guide.

Thanks
Radhe S
Hi DEVs,

I have Quote(child) and opportunity(parent).
I need to create Opportunity if Quote is created. AND then need to populate same oppty on Quote. 
I have done half task, created oppty from Quote Trigger on After Insert. But now challange how to populate this back on quote In bulkify way.
I am missing somthing that how we will keep track of quote wise oppty created??
Please guide.
Here is my code.
//Handler for Quote Trigger

public class QuoteTriggerHandler{


    public static void AfterInsertActions(List<Quote> lstQuotes){
  
    System.debug('Hello Trigger After Insert');
    List<opportunity> lstOppToInsert = new list<opportunity>();
    //Iterate loop over all new created records of Quote
    try{
            for(Quote eachQuote : lstQuotes){
            //Create instanse
            Opportunity opp = new opportunity();
            opp.Name = eachQuote.Name;
            opp.StageName= 'Closed Won';
            opp.Amount= 100; //This will be calculated and overrited automaticlly form oppty lines's price sum. We just need to populate dummy as it is required field.
            opp.CurrencyIsoCode= eachQuote.CurrencyIsoCode;
            opp.AccountId= eachQuote.AccountId;
            opp.CloseDate= System.Today();//eachQuote.Name;
            opp.ForecastCategoryName= 'Closed';
            opp.OwnerId= eachQuote.OwnerId;
            
            lstOppToInsert.add(opp);
            
            }
            
            if(lstOppToInsert!=null && lstOppToInsert.size()>0){
                Database.SaveResult[] srList = Database.insert(lstOppToInsert, false);
                System.debug('lstOppToInsert '+lstOppToInsert);
            }
            
        }catch(Exception e){
        System.debug('Error  '+e.getMessage());
    }
    
    
    
    //Once Opportunity has been inserted, Populate Same opportunity on quote
    //
    
    }


}


Thanks

 
Hi Team,
I am new to REST and integration and all. I have read about get post put patch delete and tried to do transaction on rest client.

But now i got requirement like:
I need to create oppty in salesforce from getting the data from 3rd party system.
Data will be in jSON format.

What will be the steps ...can anyone please guide me with sample code snippt.

Thanks You
Radhe S
Hi Guys,
I am new to integration things.
I have read about REST methods get, post, patch put etc. and run only the sample code to create data in salesforce like account .

Now i came across new kind of requirement.

I need to get data(oppty data) from 3rd party in JSON format and  need to read it , and need to create opportunity in salesforce.
one of my friend told me that we have to create wrapper for oppty to get the data in REST based web service and need to perform the operation, which is skipped over my head. :(

Can any one please let me know the steps and some sample code snippt to do this task.
Thanks in advance. 
Hi Team,

I am trying to create a list in Trigger and adding the values in this list by iterating for loop.
After adding value, i am trying to insert this list out side for.

Things are fine if we are testing.

But when we are scanning our code by CheckMarx, it is saying that 'Need to be bulkify using collection'. 

Am i getting this error because there is limit of 10000 record to insert in trigger?
If yes, then how to proceed with this?

Please Help.

Radhe S




 
Hello Guys,  In my scan report, I am getting the issue : Query: Bulkify Apex Methods Using Collections In Methods
I have written some nested for loops but no any DML and Query in any loop, why I am getting this error,
Here is the code snipt.

Please HELP
 
if(!rule_wise_records.isEmpty() && !rule_wise_Users.isEmpty()){
            System.debug('I am in Maps');
            list<string> subscridersId = new list<string> ();
            list<sObject> recordsToFollow2 = new list<sObject> ();
            System.debug('Rule Wise Records ' +json.serialize(rule_wise_records));  //This map Contains key and List Of Sobjects
            System.debug('Rule Wise rule_wise_Users ' +json.serialize(rule_wise_Users)); //This map Contains key and List Of Strings
            for(id rule : rule_wise_records.keySet()){
                
                System.debug('Key =====>' +rule);
                
                if(rule_wise_records.containsKey(rule))
                    recordsToFollow2 = (list<sObject>) rule_wise_records.get(rule);
                System.debug('I am in Maps Records '+recordsToFollow2);
                if(rule_wise_Users.containsKey(rule))
                    subscridersId = rule_wise_Users.get(rule);
                System.debug('I am in Maps Users '+subscridersId);
                Set < String > toRemoveDuplicates = new Set < String > ();
                if(subscridersId!=null && subscridersId.size()>0)
                    toRemoveDuplicates.addAll(subscridersId);
                List < String > uniqueId = new List < String > ();
                uniqueId.addAll(toRemoveDuplicates);
				
				
                string parentId;
                string uesrIds ='';
                for (sObject eachRec: recordsToFollow2) {
                    parentId = ((ID) eachRec.get('id')); //.substring(0,15);
                    //for (integer i = 0; i < uniqueId.size(); i++) {
                    for (String sId : uniqueId) {
                        EntitySubscription e = new EntitySubscription();
                        uesrIds = sId;
                        string key = parentId.substring(0, 15) + '@' + uesrIds.substring(0, 15);
                        if (Record_Wise_SubscriberId.ContainsKey(key) == false) { 
                            e.ParentId = parentId;
                            e.SubscriberId = sId;//userIds[i];
                            ES_ListToinsert.add(e);
                            System.debug('I am in Maps ES_ListToinsert '+ES_ListToinsert);
                            
                            if(!map_SubEntityWiseFollowRules.containsKey(key)){
                                map_SubEntityWiseFollowRules.put(key, rule);
                            }
                        }
                    }
                    
                }
                
            }
            
}

 
Hi guys,
 I have stand controller with extension, in extension i have 1 inner class.
In std controller constructor, i want to access the method from inner class . 

How to do that , plz guide
Hi Team,
I created on app using vf page and bootstrap. It is accessible in Lightening view but I am not able to find the VF Tab in Mobile-Salesforce1.
How to access VF tab in Mobile since this is my home tab for app.

Please help.
Hi Guys, facing problem in wrapping the text. Please help.
User-added image


Code:

<apex:outputLabel value="{!$ObjectType.XX__c.fields.Description__c.label}"/>
  <apex:outputText value="{!AutoFollowRullobj.Description__c}" id="theTextInput2" />
Hi All,

I am using datepicker on vf page where i am picking date and saving this in text field.
this date is being saved like 8/25/2017 (mm-dd-yyyy), but i want to save this like 2017-08-25 to use further in dynamic soql query.

Could any one please help me on this.
-Radhe S
Hi All,
How to verify the email address generated by Email Services.
My Address is :
service_request_3@1aveejuzq7mszfwp1zvjvdpxu6wyrz644y6taufj41ze0beqvy.7f-1wjkduaa.ap5.apex.salesforce.com

And i am trying to verify this by writing code:

global class EmailVarification2 implements Messaging.InboundEmailHandler{
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {
System.debug('Sent Mail');
Messaging.SingleEmailMessage semail = new Messaging.SingleEmailMessage();
String[] sendingTo = new String[]{'rxxxxxx@gmail.com'};
semail.setToAddresses(sendingTo);
semail.setSubject('Verification!');
semail.setPlainTextBody(email.subject);
 for(OrgWideEmailAddress owa : [select id, Address, DisplayName from OrgWideEmailAddress]) 
    {
    if(owa.Address.contains('ssrr')) 
    semail.setOrgWideEmailAddressId(owa.id); 
    }
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail});
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();

return result;
}
}

User-added image

I am not getting any email on mentioned email id: rxxxxx@gmail.com -Please guide
Hi Guys.

I am looking to get a substring before a specific character from a string .
For Example:
If Strings are

string s= 'gangadhar@SHAKTIMAAN';
String s2= 'raj@NAGRAJ';

i need s as gangadhar from first string and raj from second string.

Please guide.
 
Hi Folks,

I am new in apex development where i have searched about multiple code editors like, inline editor, dev console, aside.io and sublime editor using mavan tool.

finally i stopped to eclipse by configuring force.com ide.

Now I am looking for code versioning at a point of time in eclipse.  Please guide me on this.  Thanks in Advance!!
How to insert space between two characters?
I have:
String s = '(1 OR 2) AND 3';
I need to insert spcae between ( and 1 ;   and between 2 and ) ;so that final string should be s = '( 1 OR 2 ) AND 3'

Please help.
How To Split String by space and store each character or substring in array
I have: String  -   '(1 OR 2) AND 3'
I need in this way: 

String [] filterLogicSplittedbySpace=new String[]{'(', '1', 'OR', '2', ')', 'AND', '3'};

Please guide.
 
Hi DEVs,

I have Quote(child) and opportunity(parent).
I need to create Opportunity if Quote is created. AND then need to populate same oppty on Quote. 
I have done half task, created oppty from Quote Trigger on After Insert. But now challange how to populate this back on quote In bulkify way.
I am missing somthing that how we will keep track of quote wise oppty created??
Please guide.
Here is my code.
//Handler for Quote Trigger

public class QuoteTriggerHandler{


    public static void AfterInsertActions(List<Quote> lstQuotes){
  
    System.debug('Hello Trigger After Insert');
    List<opportunity> lstOppToInsert = new list<opportunity>();
    //Iterate loop over all new created records of Quote
    try{
            for(Quote eachQuote : lstQuotes){
            //Create instanse
            Opportunity opp = new opportunity();
            opp.Name = eachQuote.Name;
            opp.StageName= 'Closed Won';
            opp.Amount= 100; //This will be calculated and overrited automaticlly form oppty lines's price sum. We just need to populate dummy as it is required field.
            opp.CurrencyIsoCode= eachQuote.CurrencyIsoCode;
            opp.AccountId= eachQuote.AccountId;
            opp.CloseDate= System.Today();//eachQuote.Name;
            opp.ForecastCategoryName= 'Closed';
            opp.OwnerId= eachQuote.OwnerId;
            
            lstOppToInsert.add(opp);
            
            }
            
            if(lstOppToInsert!=null && lstOppToInsert.size()>0){
                Database.SaveResult[] srList = Database.insert(lstOppToInsert, false);
                System.debug('lstOppToInsert '+lstOppToInsert);
            }
            
        }catch(Exception e){
        System.debug('Error  '+e.getMessage());
    }
    
    
    
    //Once Opportunity has been inserted, Populate Same opportunity on quote
    //
    
    }


}


Thanks

 
Hi Team,
I am new to REST and integration and all. I have read about get post put patch delete and tried to do transaction on rest client.

But now i got requirement like:
I need to create oppty in salesforce from getting the data from 3rd party system.
Data will be in jSON format.

What will be the steps ...can anyone please guide me with sample code snippt.

Thanks You
Radhe S
Hi Team,

I am trying to create a list in Trigger and adding the values in this list by iterating for loop.
After adding value, i am trying to insert this list out side for.

Things are fine if we are testing.

But when we are scanning our code by CheckMarx, it is saying that 'Need to be bulkify using collection'. 

Am i getting this error because there is limit of 10000 record to insert in trigger?
If yes, then how to proceed with this?

Please Help.

Radhe S




 
Hello Guys,  In my scan report, I am getting the issue : Query: Bulkify Apex Methods Using Collections In Methods
I have written some nested for loops but no any DML and Query in any loop, why I am getting this error,
Here is the code snipt.

Please HELP
 
if(!rule_wise_records.isEmpty() && !rule_wise_Users.isEmpty()){
            System.debug('I am in Maps');
            list<string> subscridersId = new list<string> ();
            list<sObject> recordsToFollow2 = new list<sObject> ();
            System.debug('Rule Wise Records ' +json.serialize(rule_wise_records));  //This map Contains key and List Of Sobjects
            System.debug('Rule Wise rule_wise_Users ' +json.serialize(rule_wise_Users)); //This map Contains key and List Of Strings
            for(id rule : rule_wise_records.keySet()){
                
                System.debug('Key =====>' +rule);
                
                if(rule_wise_records.containsKey(rule))
                    recordsToFollow2 = (list<sObject>) rule_wise_records.get(rule);
                System.debug('I am in Maps Records '+recordsToFollow2);
                if(rule_wise_Users.containsKey(rule))
                    subscridersId = rule_wise_Users.get(rule);
                System.debug('I am in Maps Users '+subscridersId);
                Set < String > toRemoveDuplicates = new Set < String > ();
                if(subscridersId!=null && subscridersId.size()>0)
                    toRemoveDuplicates.addAll(subscridersId);
                List < String > uniqueId = new List < String > ();
                uniqueId.addAll(toRemoveDuplicates);
				
				
                string parentId;
                string uesrIds ='';
                for (sObject eachRec: recordsToFollow2) {
                    parentId = ((ID) eachRec.get('id')); //.substring(0,15);
                    //for (integer i = 0; i < uniqueId.size(); i++) {
                    for (String sId : uniqueId) {
                        EntitySubscription e = new EntitySubscription();
                        uesrIds = sId;
                        string key = parentId.substring(0, 15) + '@' + uesrIds.substring(0, 15);
                        if (Record_Wise_SubscriberId.ContainsKey(key) == false) { 
                            e.ParentId = parentId;
                            e.SubscriberId = sId;//userIds[i];
                            ES_ListToinsert.add(e);
                            System.debug('I am in Maps ES_ListToinsert '+ES_ListToinsert);
                            
                            if(!map_SubEntityWiseFollowRules.containsKey(key)){
                                map_SubEntityWiseFollowRules.put(key, rule);
                            }
                        }
                    }
                    
                }
                
            }
            
}

 
Hi Team,
I created on app using vf page and bootstrap. It is accessible in Lightening view but I am not able to find the VF Tab in Mobile-Salesforce1.
How to access VF tab in Mobile since this is my home tab for app.

Please help.
Hi Guys, facing problem in wrapping the text. Please help.
User-added image


Code:

<apex:outputLabel value="{!$ObjectType.XX__c.fields.Description__c.label}"/>
  <apex:outputText value="{!AutoFollowRullobj.Description__c}" id="theTextInput2" />
Hi All,

I am using datepicker on vf page where i am picking date and saving this in text field.
this date is being saved like 8/25/2017 (mm-dd-yyyy), but i want to save this like 2017-08-25 to use further in dynamic soql query.

Could any one please help me on this.
-Radhe S
Hi Guys.

I am looking to get a substring before a specific character from a string .
For Example:
If Strings are

string s= 'gangadhar@SHAKTIMAAN';
String s2= 'raj@NAGRAJ';

i need s as gangadhar from first string and raj from second string.

Please guide.
 
How To Split String by space and store each character or substring in array
I have: String  -   '(1 OR 2) AND 3'
I need in this way: 

String [] filterLogicSplittedbySpace=new String[]{'(', '1', 'OR', '2', ')', 'AND', '3'};

Please guide.
 
I want send an email from Organization-Wide Address but this accounts are should verify, the problem is that I couldn't verifying this type of address: testDisccounts@1-ys511gkea63b4vriwfq1nkw80jzyaa8t.<XXXX>.apex.sandbox.salesforce.com.
I should use this addres because when the customer reply the message, Saleforce should catch the text of the reply message and then execute an apex class.

Thank u.
Regards