Salesforce Certified Application Architect

Thursday 23 October 2014

5 Easy Steps to Configure Salesforce Live Agent

Live Agent is a native Salesforce tool that provides the ability to interactively communicate with your web site users. Once you have an active deployment of live agent, you will be able to chat with you site visitors in live time. The information collected during the chat can then be saved into your Salesforce instance and reported on. This is a great way to get valuable user feedback and at the same time provide a much needed service to people navigating your website.

You can get started with Live Agent by first contacting Salesforce.com to setup your particular instance of Salesforce with Live Agent. Live Agent does come at an additional cost and it is only available for Enterprise and Performance editions of the Service Cloud.

1. Getting Started:
Once Live Agent is enabled for your org, you will be able to view the following Live Agent options in the start-up menu. Go to Setup -> Build -> Customize -> Live Agent.

Live Agent Menu
Note: If Live Agent is not yet enabled these options will not be listed.

2. Create you user skills

The first step to implementing Live Agent is to set up Skills for users. These skills will allow you to tag the people who will be chatting with your web site visitors. You may want to have a range of skills for subject area experts. For example, you may have a hardware specialist and a software expert. By making good use of the user skills you can route the right questions to the right place quickly. Be sure not to overcomplicate the user skills with too many options, there needs to be at least one employee for each skill in order for the skill to be useful.
Live Agent Skills

3. Create your Live Agent Button


Once you have created the user skills, you can move on to the next step of creating a new button. The button is where you can connect what user skills are needed for people who click on the button. Other settings that are at the button level include; Button images, Pre or Post – Chat Forms, custom agent names, routing type, auto greeting, and Language.
It is highly advisable to carefully review the Chat Buttons & Invitations area of the setup menu because these options will control how the button works on your site. That means the entire out of the box button configuration available from Salesforce.com is located here. If additional features are required for your particular button setup, you will need to customize the Chat Button code with APEX and VisualForce. For example if you would like to set the web page button for the chat initiation to also launch an external support page, this will need to be added into the chat button code by a developer.

Chat Buttons Automated Invitations

4. Customize the Live Agent Configuration

In the last step we looked at all of the site visitor/ customer side of the Live Agent implementation. This part of the setup is where the internal company employee setup is customized. Everything your employees will be looking at from inside the service console will be controlled in this area. The same disclaimer about enhancements is true for this area of the setup as well. Since all the native out of the box configuration is located here it is important to review this carefully. If there is a feature you need to have that is not listed here, please inquire during your purchase consultation as it may require custom APEX in order to implement.
The Live Agent Configuration area entails the Basic Information, User and Profile Assignment, Supervisor Settings, and Chat Transfer Settings.
Basic Information is where custom agent names, auto away, critical wait time (seconds), sneak peek and notifications are specified.

Live Agent Configurations
Determine what users are assigned for this configuration, you can set the employees who will have this configuration applied to them by user or by profile:

Assign Users
Next, you can set the chat supervisor settings, a chat supervisor has an additional set of privileges in order to monitor and assist with the other agent’s ongoing chat. For example, a Supervisor can look at an ongoing chat and send a ‘whisper message’ to the agent that is not customer visible. For example, a supervisor may ‘whisper’ to an agent in order to offer advice or assistance. Set the Supervisor and Chat Transfer Settings:

Supervisor settings

5. Configure your Deployments

Deployment settings will allow you to specify branding, permitted Domains and set permission for visitors to save the chat transcript. The Deployment code that will be used on your webpage is located here upon Saving.

Deployments
Upon clicking Save, the following deployment code will generate on the Deployment detail page. You can take the code and paste it into your web page.

Deployments code

This is the end of the basic setup. Once your button is live you can test it out by first logging into your Salesforce and navigating to the service console. Be sure you are set to active in order to get an incoming chat. Once the chat has ended look for the Chat Transcript in your Salesforce. This is where the details of each chat are stored. The Chat Transcripts are customizable and may be summarized in Salesforce reports.
Cheers..

Tuesday 14 October 2014

View Your SalesForce.com Certifications

Are you looking to verify a Salesforce.com professional’s certifications? Please enter their full name (first and last) or primary email address. Results will be displayed if they are currently certified and have selected to share their certification information.


Please click here..
View My SalesForce.com Certifications

Winter 15 Release Notes Now Available

The Winter 15 Release Notes and Promotional Materials are now available!



Some of the big exciting new features coming include:
  • SalesForce1 Mobile Action Bar
  • Ability to Convert Leads on SalesForce1
  • Preventing Duplicates on SalesForce1 and Sales/Service Clouds when entering records
  • Viewing System Status in the SalesForceA app
  • Custom lookup field on activities (Beta)


A long time coming, you can now create Lookup custom fields on Activities! This is a beta release, but still available on all editions. With this option, you can now create lookups for tasks and events to other objects, without the restriction of having to only use the Who and What standard fields.

Cheers...

System.LimitException: Too many SOQL queries: 101 – while moving into production

This exception is one of the common governor limits that a salesforce developer experiences. Generally we would get this exception when the code is not written properly . ie. You have a SOQL query with in a for loop.

But many a times while deploying a trigger or class to production i get ths error. I check and double check if there were any SOQL queries within a for loop. But nothing in the class or trigger has the SOQL with in a loop and this is reflected in a different test class other than the code you are moving into production.

This happens because we would not have used the Test.startTest() and Test.stopTest() methods in our test classes. All the DML operations for setting the data for execution of test should be done before the Test.startTest() method and all the actions for testing your code should be between Test.startTest() and Test.stopTest() methods.

What this does is that it gives context to your test class. In other words only the code executed between the Test.startTest() and Test.stopTest() would be considered in the governor limit calculations. If there are no Test.startTest() and Test.stopTest() then all the setup code and actual test code would count towards the limits.


Monday 8 September 2014

On click of save button It should update the EXP. date and new expiry date is a future date

Requirement:

1.                                     On click of save button  new expiry date is a future date. 
a.       It should update the expiry date of the record which is selected.
b.      It should enable the payment profile if it is disabled

c.       It should update all the members payment profiles which all belongs to same token.

====================================================================
public PageReference modifyExpDate()
    {
 
    list<Payment_Profile__c>Updatelist=new list<Payment_Profile__c>();
    map<string,Payment_Profile__C> UpdateMap=new map<string,Payment_Profile__C>();

        for(Payment_Profile__C ppval:getcatInnerObjMod()){
     
          if(ppval.Active__c == false){
             ppval.Active__c = true;
           
            }

          if((integer.valueof(ppval.Expiration_Year__c)>System.Today().year())||((integer.valueof(ppval.Expiration_Year__c)==System.Today().year())&& (integer.valueof(ppval.Expiration_Month__c)>System.Today().month())))
          {

            if(TokenMap.get(ppval.Gateway_Token_Id__c)!=null)
            {
            for(Payment_Profile__C p:TokenMap.get(ppval.Gateway_Token_Id__c))
            {
                p.Expiration_Month__c=ppval.Expiration_Month__c;
                p.Expiration_Year__c=ppval.Expiration_Year__c;
                if(UpdateMap.get(p.id)==null)
              UpdateMap.put(p.id,p);
             }
             }
             UpdateMap.put(ppval.id,ppval);
         
          }
          else{
              ApexPages.addMessage(new ApexPages.message(ApexPages.severity.Error,'Exp.Date should be future'));
              continue;
          }
          }
            if(UpdateMap.keyset().size()>0){
            System.debug('UpdateMap-->'+UpdateMap);
            update UpdateMap.values();
            ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Exp.Date modified for selected payment profiles'));
         
            }
      return null;
 
    }

Cheers..

Thursday 26 June 2014

Be aware of the following considerations for trigger context variables:

  • trigger.new and trigger.old cannot be used in Apex DML operations.

  • You can use an object to change its own field values using trigger.new, but only in before triggers. In all after triggers, trigger.new is not saved, so a run time exception is thrown.

  • trigger.old is always read-only.

  • You cannot delete trigger.new.


Cheers...

How to Insert Transaction and Update Member on button click.

global class InsertTransaction {

WebService static string  InsertRecord(string id) {

    String OppId=id;
    string ErrorMesg;
    Map<ID,Member__c> mapmembers = new Map<ID,Member__c>();
    List<ID> MemberIDs =new List<ID>();
    List<ID> ProgramEnrIds =new List<ID>();
    List<Transaction__c> listTrans=new List<Transaction__c>();
    List<Member__c> lopp1=[select id ,Active__c,Program_Enrolled__c,Enrolled_Date__c,
    Loyalty_Enrolled__c,Points__c from Member__c where id =:OppId limit 1];
    integer counIn=[select count() from Transaction__c where Member__c =:OppId ];
    set<string> setPromId = new set<string>();
    List<Member__c> Members =new List<Member__c>();
    if(counIn > 0) {
    ErrorMesg ='You can not create a Transaction because this member having the Transaction ';
    }

    else {
    for(Member__c m:lopp1){
    Transaction__c tObj=new Transaction__c(Transaction_Date__c=system.today());
    tObj.Member__c=m.id;
    tObj.ProgramEnrolled__c=m.Program_Enrolled__c;
    tObj.Sub_Type__c='Enrollment';
    tObj.Status__c ='Processed';
    tObj.Loyalty_Product__c='a0590000008at2y';
    listTrans.add(tObj);
    }
 
    for(Transaction__c tObj1:listTrans){
    ProgramEnrIds.add(tObj1.ProgramEnrolled__c);
    MemberIDs.add(tObj1.Member__c);
 
    }
 
 list<Promotion__c > lisProm=[select id,Active__c,Program_Enrolled__c,Apply_To__c from                  Promotion__c where Program_Enrolled__c In : ProgramEnrIds];
    System.debug('lisProm---->'+lisProm.size());
    for(Promotion__c obj:lisProm){
    setPromId.add(obj.id);

    }
    list<Rule_Action__c>ListObj=[Select PointsAssigned__c,        id,Number_of_Points__c,Promotion__c,Promotion__r.Apply_To__c,
 Object__c from Rule_Action__c where Promotion__c in:setPromId];
    System.debug('ListObj---->'+ListObj.size());
 
    Members =[Select Points__c FROM Member__c Where ID in:MemberIDs];
    System.debug('Members ---->+Members )');
 
    for(Member__c m:Members){
    mapmembers.put(m.id,m);
    System.debug('mapmembers---->'+mapmembers.size() );
    }
 
    for(Transaction__c tn:listTrans){
    Member__c Member = mapmembers.get(tn.Member__c);
    System.debug('Member ---->'+Member);
 
    for(Rule_Action__c raObj:ListObj){
    if(raObj.Promotion__r.Apply_To__c == 'Enrollment'){
    Member.Points__c=raObj.Number_of_Points__c;
    System.debug('Member Points---->'+Member.Points__c );
    System.debug('raObj Points---->'+raObj.Number_of_Points__c);
    }
     mapmembers.put(Member.id,Member);
    }
    }
 
    if(listTrans.size()>0){
    Insert listTrans;
    System.debug('mapmembers---->'+mapmembers.size());
    }
 
    update mapmembers.values();
 
    ErrorMesg='Transction created succesfully';
 
    }
      return ErrorMesg;
   }

 }

Monday 9 June 2014

How to schedule Batch Class for every hour in Salesforce?

Sample code:

SampleSchedulableClass obj = new SampleSchedulableClass();

String cron = '0 59 * * * *'
System.schedule('Testing', cron, obj);


Expression
Description
0 0 13 * * ?
Class runs every day at 1 PM.
0 0 22 ? * 6L
Class runs the last Friday of every month at 10 PM.
0 0 10 ? * MON-FRI
Class runs Monday through Friday at 10 AM.
0 0 20 * * ? 2010
Class runs every day at 8 PM during the year 2010.

Cheers!!

System.schedule in Apex scheduler in Salsforce

Sample code:

SampleSchedulableClass obj = new SampleSchedulableClass();

String cron = '0 59 * * * *'
System.schedule('Testing', cron, obj);

The above code executes SampleSchedulableClass for every one hour.

Syntax for Cron:

Seconds Minutes Hours Day Month Week Year

Seconds : 0 - 59
Minutes  : 0 - 59
Hours     : 0 - 23
Day        : 1 - 31
Month    : 1 - 12
Week     : 1 - 7(Sunday is first and Saturday is last)
Year       : upto 2099

Year is optional.

Expression
Description
0 0 13 * * ?
Class runs every day at 1 PM.
0 0 22 ? * 6L
Class runs the last Friday of every month at 10 PM.
0 0 10 ? * MON-FRI
Class runs Monday through Friday at 10 AM.
0 0 20 * * ? 2010
Class runs every day at 8 PM during the year 2010.

? - No value
* - All values
L - Last
W - Nearest weekday


How to update a field from one to another object on button click.

global class TransactionProcessingUtility_1  {

WebService static void processTransaction (id transactionids) {

List<Transaction__c> TransactionsToUpdate =new List<Transaction__c>();
List<ID> MemberIDs =new List<ID>();
List<ID> ProductIDs =new List<ID>();
List<ID> ProgramEnrIds =new List<ID>();
List<Member__c> Members =new List<Member__c>();
List<LoyaltyProduct__c> Products =new List<LoyaltyProduct__c>();
Map<ID,Member__c>   mapmembers = new Map<ID,Member__c>();
Map<ID,LoyaltyProduct__c>   mapproducts = new Map<ID,LoyaltyProduct__c>();  
Map<ID,Transaction__c>   maptransactions = new Map<ID,Transaction__c>();
List<String> transfilter = new List<String>{'Processed','Cancelled','Failed'};  

if(transactionids != null) {
List<Transaction__c> listofTransactions =[SELECT ID,
Member__c,
Processing_Comment__c,
Loyalty_Product__c,
Status__c,
Sub_Type__c,ProgramEnrolled__c,
Type__c,
Transaction_Date__c
FROM Transaction__c WHERE id =:transactionids AND
Status__c NOT IN :transfilter];

for(Transaction__c t:listofTransactions){
MemberIDs.add(t.Member__c);
ProductIDs.add(t.Loyalty_Product__c);
maptransactions.put(t.id, t);
ProgramEnrIds.add(t.ProgramEnrolled__c);

}

set<string> setPromId = new set<string>();
Map<string,Rule_Action__c >  updateMap = new Map<string,Rule_Action__c >();
list<Promotion__c > lisProm=[select id,Active__c,Program_Enrolled__c,Apply_To__c from Promotion__c where Program_Enrolled__c In : ProgramEnrIds];

for(Promotion__c obj:lisProm){
setPromId.add(obj.id);

}

list<Rule_Action__c>ListObj=[Select id,Number_of_Points__c,Promotion__c,Promotion__r.Apply_To__c, Object__c from Rule_Action__c where Promotion__c in:setPromId];
Members  =[Select Points__c FROM Member__c Where ID in:MemberIDs];
Products =[Select Product_points__c FROM LoyaltyProduct__c Where ID in:ProductIDs];

for(Member__c m:Members){
mapmembers.put(m.id,m);

}

for(LoyaltyProduct__c p:Products){
mapproducts.put(p.id,p);

}

for(Transaction__c t:listofTransactions){
Member__c Member = mapmembers.get(t.Member__c);
LoyaltyProduct__c product = mapproducts.get(t.Loyalty_Product__c);
for(Rule_Action__c raObj:ListObj)
{

if(t.Type__c =='Accrual' && t.Sub_Type__c =='Product' && raObj.Promotion__r.Apply_To__c == 'Accrual-Product' ){
Member.Points__c=Member.Points__c+raObj.Number_of_Points__c;
t.Status__c ='Processed';
t.Processing_Comment__c ='Points added to member';
}

else if( t.Type__c =='Redemption' && t.Sub_Type__c =='Product' && raObj.Promotion__r.Apply_To__c == 'Redemption-Product' ) {
if( raObj.Number_of_Points__c < Member.Points__c  )
{

Member.Points__c=Member.Points__c - raObj.Number_of_Points__c;
t.Status__c ='Processed';
t.Processing_Comment__c ='Points redeemed from member';

}
else if(raObj.Number_of_Points__c > Member.Points__c ) {
t.Status__c ='Failed';
t.Processing_Comment__c ='Not enough points to redeem';

}
}
maptransactions.put(t.id,t);

}
}
update mapmembers.values();
update maptransactions.values();

}
}

}
=============================================================
{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
    {!REQUIRESCRIPT("/soap/ajax/14.0/apex.js")}
   
     var result = sforce.apex.execute(
    "TransactionProcessingUtility_1",  //class name  
    "processTransaction",  //method name      
    { transactionids: '{!Transaction__c.Id}'    // method parameter
     });
window.alert("Are you sure want to proceed!!" );
window.location.reload(true);

Wednesday 21 May 2014

ASIDE is a Sales force IDE in the Cloud.

What is ASIDE?ASIDE is full-featured Salesforce IDE built from the ground up for efficient delivery, design, and testing of Apex and Visualforce code. 

Is ASIDE open source?Currently it is not, but possibly in the future. 

What features will be added to ASIDE next?Currently ASIDE is getting bugs fixed and polish added, but after that the next new feature will be improved static resource support. 

Is there anything I can do if the ASIDE login is not working?Try using the frontdoor login. 

Does ASIDE store any of my Salesforce or personal data?No, ASIDE does not store any of this information. 

Who can I contact if I have more questions?Click here if you have any.

ASIDE does all of the things you need from a Salesforce IDE, just easier and faster. Check out the feature list below.
  • Code Editor
    • Create, edit and delete all Apex and Visualforce code within your org
    • Auto-completion of Apex and Visualforce
    • Auto-generation of Apex Controllers/Extensions and related test code
    • Save conflict detection
    • Static Resource edit support
    • Execute Anonymous
    • Debug log access
    • Find and replace within file
    • Org-wide code search
    • Update file version
    • Local code history
    • "Open in Salesforce", allowing easy access to rendered VF pages and more
    • Look and feel of editor is fully configurable (theme, font size, invisibles, etc)
    • Based on the awesome ace editor
    • Access to documentation, ability to run unit tests, and probably a few things im forgetting…
    • Highlight lines not unit tested and see other coverage information
  • Unit Test Execution Environment
    • See all unit test results, class-by-class
    • Configure the result view to focus on certain unit tests
    • Easily drill into failures with the stack trace parser
    • Run unit tests three different ways
      • All at once - run all the tests in your org with one button click
      • By query - write a query that targets a group of tests to run
      • Manual selection - from a multi-select typeahead
    • Generate a code coverage report for your organization
  • Deploy Manager
    • Easy-to-use interface for retrieves and deploys
    • Create filters to target files for retrieves
    • Ability to filter by last retrieve and last deploy dates
    • Can retrieve files multiple ways:
      • Drop a package.xml
      • Select files to retrieve by using a pre-canned or custom filter
    • Can deploy by dropping a zip file retrieve result
    • Detailed deploy status and results shown upon deploy
    • Ability to configure deploy (e.g. Run Unit Tests, Validate Only, etc)
  • Query Tool
    • Query all the data in your org
    • Delete and export query results
    • Filter and paginate query results
    • Inline data edit and create
    • Maintains query history
    • Show/hide/reorder/resize columns
    • Sort query results
    • Share queries with other users

cheers..

Tuesday 13 May 2014

Relationship between parent and child .

Hi,

Please see below relatioship ...

1) Parent to Child
SELECT Id, (SELECT Id from OpportunityLineItems) FROM Opportunity (Standard Version)
Select ID, (Select ID FROM Orders__r) FROM Account (Custom Object Version)



2) Child to Parent
SELECT Id, Name, Account.Name FROM Contact
Select ID, VCR__r.Name FROM Account

Sunday 11 May 2014

Salesforce.com Certified Force.com Developer Spring-14 Release Exam

1.  What is a capability of Salesforce Orders?
  •        Reduction orders can be created to process product returns.
  •        Orders can be created directly from an account or contract. 
2.  What option is available to a user when building a dashboard?
  •               Group and name dashboard filter values.
  •               Display fractions as percentages in a table component.
3.  What is a capability of the Data Import Wizard?
  •        Example import values are displayed to help with field mapping.
  •        An import file can be dragged into the wizard for uploading.

4.  How can an administrator customize reporting for users?
  •          Hide report types from all users.
  •          Remove footer information from exported reports.

Cheers....


Thursday 8 May 2014

Spring '14 Force.com Platform Release (Pilot) Scheduled Apex Updates

Increased Query Timeout in Batch Start Method:

The query timeout in the batch Apex start method has been increased to 10 minutes

Tuesday 6 May 2014

How to remove duplicates from list in Salesforce?

Create a map instead of list and finally if you want to insert or update the map values then you can insert or update.


Sample Code:

Map<Id, Account> mapAccount = new Map<Id, Account>();

for(Account acc : listAccount){
...............
...............
mapAccount.put(acc.Id, acc);
}

update mapAccount.values();


Note: Update Map value instead of List..


Cheers...

Sunday 4 May 2014

7 Enhancements in the Salesforce Spring ’14 Release.

1. Direct-to-Agent Chat Available
Once you set up your agents with their corresponding skills, you’ll be able to route a chat request to one specific agent, based on skill set and availability. Additionally, a few other related enhancements make this even better: Agent-declined chat requests can be automatically rerouted AND chat requests can now be automatically accepted once assigned to an agent.

2. Launch Flows from Workflow Rules – Pilot
Salesforce’s Take: Spring ’14 introduces a new workflow action called a flow trigger, which launches a flow when the workflow rule criteria are met. A trigger-ready flow is a flow that can be launched from a flow trigger workflow action. Because trigger-ready flows must be able to run in bulk and without user interaction, they can’t contain Step, Screen, or Apex Plug-in elements in any flow version.
To set this up, you’ll need to do the following:
  1. Create and activate a trigger-ready flow
  2. Create a workflow rule
  3. Create a flow trigger workflow action and associated it with the above workflow rule
  4. Activate the workflow rule
3. TEXT() Function Picklist Support Expanded
Salesforce’s Take: The TEXT() formula function now converts picklist values to text in approval rules, approval step rules, workflow rules, auto-response rules, escalation rules, assignment rules, and custom buttons and links.

4. Partial Data Sandboxes

5. Mass Assign Permission Sets
Salesforce’s Take: Now you can assign multiple users and revoke multiple user assignments from a permission set.

6. Create Cases from Salesforce Side Panel
Salesforce’s Take: If your users track customer support issues and gripes with cases they create in Salesforce, they can now create them directly from the side panel.
7. Salesforce Console Enhancements – Multi-monitor
Salesforce’s Take: Move portions of a console from your browser to any locations on your screens that help you work best. Pop out primary tabs, custom components, and other console items and drag them to any area on your screens. If pinned lists are set up, place popped out items in a playground to keep track of Salesforce windows when several applications share your screens.




Monday 27 January 2014

Relationship between Accounts,Contacts In salesforce


Account and contact behaves as master detail in business logics but on UI it is a lookup relationship. Let me explain you a bit more.

You can create a contact without filling account i.e it shows that there is a lookup relationship between account and contact.

If you have created a contact with account and you delete that account then contact will be deleted, this shows that it is in Master-Detail relationship. This is a standard behavior.

So we can say it in both ways, but it documentation it is a lookup relationship.


I hope it is helpful for you 


Thanks
Gaurav

Wednesday 22 January 2014

How to integrate SFDC with external webservice?


Salesforce: APEX HTTP callout example, POST and GET
Steps to implement apex HTTP callout:
How to integrate SFDC with external webservice?



Using this you can integrate your SFDC instance with external systems, that can be your SAP, Oracle Apps or any other in-house application which need your sfdc data more or less immediately to process request.

This callout is for Rest webservice:
 
1) External system enabled with REST webservice with JSON/XML response ( we are using Json in this example)
2) Register, our external endpoint URL with SFDC "Remote sites". ( endpoint URL, is the external system URL which will serving your request)

3) Invoking HTTP Callouts using following code:


Following is the sample/example apex class which is making callouts to external system rest webservice. This example also shows you , how Serializeand deSerialize Json. (Object to Json String and vise-verse).

public with sharing class TestHttpCallOut {

String endPoint = 'http://***yousite_app***.com/sfdc';

public void postDataToRemote(String name,String email,Integer age){
   performAction('POST',name,email,age);  
}
public void fetchDataFromRemote(){
   performAction('GET');  
}


 public void performAction(String method,String name,String email,Integer age){
           
             //Prepare http req
             HttpRequest req = new HttpRequest();
             req.setEndpoint(endPoint);
             req.setMethod(method);
           
                Map<String,object> mapEmp = new Map<String,object>();
                mapEmp.put('name',name);
                mapEmp.put('email',email);
                mapEmp.put('age',age);
                String JSONString = JSON.serialize(mapEmp);  
       
           
            req.setBody(JSONString);
           
            Http http = new Http();
            HTTPResponse res = http.send(req);
           
            System.debug(res.getBody());
       
  }
 
public void performAction(String method){

             HttpRequest req = new HttpRequest();
             req.setEndpoint(endPoint);
             req.setMethod(method);
           
            Http http = new Http();
            HTTPResponse res = http.send(req);
            Map<String,String> responseMap =   (Map<String,String>)JSON.deSerialize(res.getBody(),Map<String,String>.class);
             
              System.debug(responseMap);
             
  }
   
 
}

Use folloiwng commented code to execute this example,

/*
//TestHttpCallOut  a = new TestHttpCallOut ();
//a.fetchDataFromRemote();
//a.postDataToRemote('BOB','abc@xyz.com',101);
*/

Salesforce trigger list/map values on insert/update/delete/undelete


This table shows us when Id exists in trigger:

insert
update
delete
undelete
before
null
Id
Id
-
after
Id
Id
Id
Id

And this one shows what values of Map/List we have on different stages of trigger work:

Execution
Method
insert
update
delete
undelete
before
trigger.new()
List
List
null
-
before
trigger.newMap()
null
Map
null
-
before
trigger.old()
null
List
List
-
before
trigger.oldMap()
null
Map
Map
-
after
trigger.new()
List
List
null
List
after
trigger.newMap()
Map
Map
null
Map
after
trigger.old()
null
List
List
null
after
trigger.oldMap()
null
Map
Map
null

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