Here we can check REST API request and response through SOAP UI Tool .
One Customer Platform to connect everything. For any Salesforce related training (Admin,Apex,Advance Apex,Web Services,Lightening). contact me at Mobile Number: +91-8050010804,9113835016 Email: grv.shukla2@gmail.com
Wednesday, 25 November 2015
Working with REST Requests through SOAP UI
Here we can check REST API request and response through SOAP UI Tool .
Understanding the usage of Test.isRunningTest()
Test.isRunningTest()
:
1.This is not used in test classes but in other classes in order to verify if the call is from a test class.
Example :
1.This is not used in test classes but in other classes in order to verify if the call is from a test class.
2.Test.isRunningTest() is used to define whether the code is executed by test class.Example :
public String Test(){ // Build the http request // Invoke web service call String result = ''; if (!Test.isRunningTest()){ // Make a real callout since we are not running a test } else { // A test is running result = Response; } return result;}Tuesday, 24 November 2015
How to find duplicates element from a list in Salesforce Apex
List<String> StringTempList = new List<String>{'One','two','Three','Four','One','two'};
set<String> setTempString = new set<String>();
set<String> duplicateTempString = new set<String>();
for(String s:StringTempList ){
if(!setTempString.add(s)){
duplicateTempString .add(s);
}
}
System.debug('duplicatelistString----'+duplicateTempString );
System.debug('duplicatelistString----'+duplicateTempString.add('ten'));
set<String> setTempString = new set<String>();
set<String> duplicateTempString = new set<String>();
for(String s:StringTempList ){
if(!setTempString.add(s)){
duplicateTempString .add(s);
}
}
System.debug('duplicatelistString----'+duplicateTempString );
System.debug('duplicatelistString----'+duplicateTempString.add('ten'));
Fetching Unique Record in Salesforce via SOQL
- Using GROUP BY we are able to fetch the Unique Record in Salesforce
- GROUP BY returns aggregate result list.
also you can use of Count() method in SOQL
SELECT count(id),Name FROM Account GROUP BY Name
Monday, 23 November 2015
Difference between SOQL_1 and SOQL_2 in Salesforce
SOQL_1 = [SELECT Id, Active__c,Opportunity__c FROM UID__c WHERE Opportunity__c IN: oppMap.keyset()] ;
SOQL_1 will returns a set which contains all the keys .
SOQL_2 = [SELECT Id, Active__c,Opportunity__c FROM UID__c WHERE Opportunity__c IN: oppMap.Values()] ;
SOQL_2 will returns a List which has all the values .
SOQL_1 will returns a set which contains all the keys .
SOQL_2 = [SELECT Id, Active__c,Opportunity__c FROM UID__c WHERE Opportunity__c IN: oppMap.Values()] ;
SOQL_2 will returns a List which has all the values .
Subscribe to:
Posts (Atom)
Salesforce Certified Application Architect & Certified Data Architecture and Management Designer Exam
How to pass Salesforce Certified Data Architecture and Management Designer Exam This exam was 1st architect exam for me. Its not that muc...
-
Use extreme care if you are planning to invoke a batch job from a trigger. You must be able to guarantee that the trigger will not add mor...
-
Add the following snippet to your visualforce page: <apex:actionStatus id="pageStatus"> <apex:facet name="sta...
-
Boolean variables can have three possible variables: true, false and undefined. To make it even more confusing, if you check for the valu...