Salesforce Certified Application Architect

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.
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'));

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. 
LIST<AggregateResult> AccListAggregare = [SELECT Name from Account GROUP BY Name];


 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 .

 

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...