Sunday, July 30, 2017

Salesforce Certified Platform App Builder – Summer ’17 Release Exam


1 of 5.
How can users see the change history of key fields in an object record?
A. History related list with field tracking
B. Reporting Snapshot
C. Historical Trend Reporting
D. Setup Audit Trail

2 of 5.
Which two components are supported when building Lightning pages with the Lighting App Builder?
Choose 2 answers

A. Related Records
B. Chatter Feed
C. Social View
D. Flows

3 of 5.
What is a secure method of creating a single field from two encrypted fields?
A. Create the two source fields, use a formula with & to concatenate, populate the data into the two source fields, then encrypt the source fields
B. Create a custom formula referencing the two encrypted fields using & to concatenate
C. Disable encryption on the two source fields, create a formula using & to concatenate, then reenable encryption on the two source fields
D. Disable Shield Platform Encryption, create a formula using & to concatenate, then reenable Shield Platform Encryption


4 of 5.
What happens to an automated notification email generated by a process if another process subsequently modifies the same record?
A. The email is sent twice.
B. The email is suppressed.
C. The email is queued and may send depending on the secondary process.
D. The email is sent.
5 of 5.
Which tool will help the consultant see if APEX or Visualforce code is running an out-of-date API version?

A. Optimizer
B. Lightning Experience Readiness Check
C. Lightning Experience Migration Assistant
D. Health Check

Salesforce Certified Platform Developer I – Summer ’17 Release Exam

Salesforce Certified Platform Developer I – Summer ’17 Release Exam


1 of 5.
What are two considerations when overriding standard actions?
Choose 2 answers
A. Overriding standard actions with a Lightning component applies only to Lightning Experience and Salesforce1, but not to Salesforce Classic.
B. Overriding standard actions with a Visualforce page applies only to Salesforce Classic and Lightning Experience, but not to Salesforce1.
C. Overriding standard actions with a Visualforce page applies to Salesforce Classic, Lightning Experience, and Salesforce1.
D. Overriding standard actions with a Lightning component applies to Lightning Experience, Salesforce1, and Salesforce Classic.


2 of 5.
How can a validity check be performed on a component?A
A. cmp.get() != null
B. cmp.get() == true
C. cmp.get(“v.isValid”) != null
D. cmp.get(“v.isValid”) == true


3 of 5.
Which standard actions can be overridden with Lightning Components?
A. Tab, View, Edit, New
B. View, Edit, New, Delete
C. List, Edit, New, Delete
D. List, View, Edit, New


4 of 5.
What is a consideration for Locker Service Enablement?
A. Locker service is enabled for all custom Lightning Components with API version 40.0 or greater.
B. Locker service is disabled for all custom Lightning Components, regardless of the API version.
C. Locker service is disabled for custom Lightning Components implementing the interface force:ignoreLockerService.
D. Locker service is enabled for custom Lightning Components implementing the interface force:enforceLockerService.


5 of 5.
How do the CSS enhancements to the Lightning Design System improve the developer experience? A
A. Single dashes are used in class names to enable commenting.
B. Uppercase is used to distinguish from custom class names.
C. Class names are available in upper and lower case.
D. Class names are abbreviated to reduce code length.

Summer ’17 Release Administrator maintenance Exam


1 of 5.
what action can be taken in Lightning, if you receive an approval request that someone
else should approve?
A. Delete the associated record.
B. Change approval Entry Criteria.
C. Edit Approval Process Manager
D. Re-assign the approval request
2 of 5.
How can an administrator allow users to choose different views of a dashboard in Lightning Experience?D
A. Dashboard designer
B. Report filters
C. Report creator
D. Dashboard filters
3 of 5.
Which two chatter groups will show a seen by count of people who viewes the post, in the Lightning Experience? choose 2 answers CD
A. Public
B. Restricted
C. Unlisted
D. Private
4 of 5.
where are the files and related records attached when a sales user converts a lead? C
A. Contact, account, person account, Opportunity records.
B. Contact, account, opportunity, quote records.
C. Contact, account, opportunityrecords
D. Contact account, person account records
5 of 5.
which two feature best describe the new Lightning optimized Log a call action? choose 2 answers BC
A. Autopopulate the case team
B. Autopopulate the case contact
C. Autolink the call log to the case
D. Autolink the audit log to the case

Integrate with Active Campaign

>>To integrate with Active campaign first register with free trail edition by the below link

http://www.activecampaign.com/free/


>> After logging in create a list by clicking on LIST TAB


>>At the complete right top of the screen,click on your profile and click on my settings.

>>under your settings take the key and url and use them in the following code.

Ex: Key='a1228bae475b1f07c64dbf7d4018758c5f3cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

      url='https://sfdc550.activehosted.com;

>> please register Active campaign url in the salesforce remote site settings.

EX: https://tcs550.activehosted.com


Step 1:

create below class in the Salesforce org, this is to control recursion

public class recursioncontrol {     public static boolean firstRun = true;  }
   
Step 2:
create below class in the Salesforce org, this contains http code.

public class activecamp { @future (callout=true) public static void contactcreation(string firstname, string lastname, string email) { String APIkey='a1228bae475b1f07c64dbf7d4018758c5f3cac6b036c4c0c1afa70e5051c1cd5dcbd099b'; String apiaction='contact_add'; string hostname='https://tcs550.api-us1.com/admin/api.php?'; string apioutput='json'; String thirdpartyendpoint=hostname+'api_key='+APIkey+'&api_action='+apiaction+'&api_output='+apioutput;  HttpRequest req=new HttpRequest();     req.setMethod('POST');          req.setEndpoint(thirdpartyendpoint);              req.setBody('Content-Type=application/x-www-form-urlencoded');               string targetString='email='+email +'&first_name='+firstname+'&last_name='+lastname+'&p[1]=1';     req.setBody('Content-Length="512"');  req.setBody(targetString);     System.debug('HttpRequest :' +req); System.debug('HttpRequest :' +req.getBody());  HttpResponse response = null;     Http http = new Http();     response = http.send(req); system.debug('@@@@@@@@@@@'+response);     system.debug('@@@@@@@@@@@'+response.getBody()); } }

Step 3:

Copy this code in the contact triggers, this helps to integrate in real time
trigger syncwithactivecampaigns on Contact (after insert, after update) {



For(Contact c1:Trigger.new){

if(recursioncontrol.firstrun){

//activecampint.contactupdatecreation(c1.firstname,c1.lastname,c1.email,integer.valueof(c1.phone));

activecamp.contactcreation(c1.firstname,c1.lastname,c1.email);

recursioncontrol.firstrun=false;
}

}


}

Friday, July 28, 2017

Salesforce to Salesforce Inbound/outbound integration

Paste this code in the target org

============================
@RestResource(urlMapping='/v1/CustomResturl/*')

   global with sharing class getContact {
   
     @Httpget
      global static list<contact> mycontacts(){
        RestRequest req = RestContext.request;
        RestResponse res = Restcontext.response;
      
        list<contact> lstcontact =[Select id , name,Email from contact];
        
        system.debug('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'+lstcontact);
        
        return lstcontact ;
      }
      
     
   }
==================================

Execute below code in the Source org
==========================



public class DeserializeJsonResp
   {
      public String id;
      public String access_token;
   }

String reqbody = 'grant_type=password&client_id='+'your clientid which you got from your third party connected app'+'&client_secret='+'your secret key which you got from your third party connected app'+'&username='+'jagadeesh777@chitti.com'+'&password='+'yourpasswordsecuritytoken';

System.debug('%%%%%%%%%%%%%%%%%'+reqbody);

Http h = new Http();
      HttpRequest req = new HttpRequest();

      req.setBody(reqbody);

      req.setMethod('POST');

      req.setEndpoint('https://jagadeesh777-dev-ed.my.salesforce.com/services/oauth2/token');

      HttpResponse res = h.send(req);

System.debug('&&&&&&&&&&&&&&&&'+res.getbody());

 DeserializeJsonResp responsewithtoken = (DeserializeJsonResp)JSON.deserialize(res.getbody(),DeserializeJsonResp.class);
     system.debug('@@@@access_token@@'+responsewithtoken );



           Http h2 = new Http();
           HttpRequest req1 = new HttpRequest();
           req1.setHeader('Authorization','Bearer ' + responsewithtoken.access_token);
           req1.setHeader('Content-Type','application/json');
           req1.setHeader('accept','application/json');
         
  
           req1.setMethod('GET');
           req1.setEndpoint('https://jagadeesh777-dev-ed.my.salesforce.com/services/apexrest/v1/CustomResturl/');
           HttpResponse res1 = h2.send(req1);
           String trimmedResponse = res1.getBody().unescapeCsv().remove('\\');
     JSONParser parser = JSON.createParser(res1.getBody());


List<Contact> insertcontacts=new List<Contact>();
while (parser.nextToken() != null) {
                //Id
               
                if((parser.getCurrentToken() == JSONToken.FIELD_NAME) ){
                    Contact cont;
                    if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'Id')) {
                    // Get the value.
                    parser.nextToken();
                    // Compute the grand total price for all invoices.
                    string sId= parser.getText();
                    cont=new Contact();
                    cont.Id=sId;
                    system.debug('Id@@@' + sId);
                   
                    parser.nextToken();
                    if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&
                        (parser.getText() == 'Name')) {
                     
                        parser.nextToken();
                     
                        string sName= parser.getText();
                        cont.LastName=sName;
                       
                    }
                   
                    //Email
                    parser.nextToken();
                    if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) &&
                        (parser.getText() == 'Email')) {
                       
                        parser.nextToken();
                       
                        string sEmail= parser.getText();
                        cont.Email=sEmail;
                     
                    }
                   
                insertcontacts.add(cont);
                }
    
               
                }
    }
    
   
    Insert contList;