Salesforce Certified Application Architect

Tuesday, 27 August 2019

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 much easy if we compare it with Sharing and Visibility Exam.
But if you do good preparation and practise and study all topics mentioned in resource guides,
then you can easily crack it. Good understanding of data and security/sharing model in an LDV (large data volume) environment
and best practices around LDV migration are required for preparing for the exam. Following are most important topics:


Image result for application architecture certification new logoSalesforce Certified Data Architecture and Management Designer Exam
  • Large Data Volumes (LDV)
  • Skinny Tables
  • Indexes
  • Data Loading(LDV)
  • Data Quality

Large Data Volumes (LDV)


There are a number of questions concerning that issue. Basically when you hit 2 million records threshold we can start talking about LDV. There are some areas that may be affected by such an amount of records:
  • Reports
  • Search
  • Listviews
  • SOQL

To have a better overview of the topic I strongly recommend going through Salesforce’s Best Practices for Deployments with Large Data Volumes ebook.
There is a nice chapter devoted to the database architecture. It’s quite eye opening in terms of how data is stored, searched and deleted in Salesforce:
database
There are some key challenges connected with LDV:
  • Data Skew – each record shouldn’t have more than 10k children; data should be even distributed
  • Sharing Calculation Time – one can defer sharing calculation when loading big chunks of data into system
  • Upsert Performance – better to seperately insert and then update records; upsert is quite expensive operation
  • Report Timeouts
    • Apply selective report filtering
  • Non-Selective Queries (Query Optimization)
    • Make query more selective: reduce the number of objects and fields used in a query
    • Custom Indexes
    • Avoid NULL values (these are not indexed)
  • PK Chunking Mechanisms
  • Data Reduction Considerations:
    • Archiving – consider off-platform archiving solutions
    • Data Warehouse – consider a data warehouse for analytics
    • Mashups – real-time data loading and integration at the UI level (using some VF page)

Skinny Tables

Skinny tables are quite an interesting concept that I was not aware of before.
Salesforce creates skinny tables to contain frequently used fields and to avoid joins, and it keeps the skinny tables in sync with their source tables when the source tables are modified. To enable skinny tables, contact Salesforce Customer Support. For each object table, Salesforce maintains other, separate tables at the database level for standard and custom fields. This separation ordinarily necessitates a join when a query contains both kinds of fields. A skinny table contains both kinds of fields and does not include soft-deleted records. This table shows an Account view, a corresponding database table, and a skinny table that would speed up Account queries.
skinny_table

Indexes

Indexes Salesforce supports custom indexes to speed up queries, and you can create custom indexes by contacting Salesforce Customer Support.
The platform automatically maintains indexes on the following fields for most objects.
  • RecordTypeId
  • Division
  • CreatedDate
  • Systemmodstamp (LastModifiedDate)
  • Name
  • Email (for contacts and leads)
  • Foreign key relationships (lookups and master-detail)
  • The unique Salesforce record ID, which is the primary key for each object
Salesforce also supports custom indexes on custom fields, with the exception of:
  • multi-select picklists
  • text area (long)
  • text area (rich)
  • non-deterministic formula fields (like ones using TODAY or NOW)
  • encrypted text fields.
External IDs cause an index to be created on that field, which is then considered by the Force.com query optimizer. External IDs can be created on only the following fields:
  • Auto Number
  • Email
  • Number
  • Text

Data Loading

You have to know ways to integrate Salesforce with data from external systems:
  • ETL Tools
  • SFDC Data Import Wizard
  • Data Loader
  • Outbound Messages
  • SOAP and REST API
This is crucial here to know a little bit about Bulk API.
Bulk API is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, insert, update, upsert, or delete many records asynchronously by submitting batches. Salesforce processes batches in the background.
Interesting fact is that Data Loader can also utilize Bulk API. You just have to explicitly switch it on in the settings:
bulk_settings
Source: https://developer.salesforce.com/page/Loading_Large_Data_Sets_with_the_Force.com_Bulk_API
Behind the scenes Bulk API uploads the data into temporary tables then executes processing of the data (actual load into target objects) using parallel asynchronous processes:
bulk_overview
Source: https://developer.salesforce.com/page/
Loading_Large_Data_Sets_with_the_Force.com_Bulk_API
As mentioned in the LDV section you have to keep in mind few things when uploading data:
  • Disable triggers and workflows
  • Defer calculation of sharing rules
  • Insert + update is faster than upsert
  • Group and sequence data to avoid parent record locking
  • Tune the batch size (HTTP keepalives, GZIP compression)

Data Quality

There is some nice overview from Salesforce – 6 steps toward top data quality:
  • Use exception reports and data-quality dashboards to remind users when their Accounts and Contacts are incorrect or incomplete. Scheduling a Dashboard Refresh and sending that information to managers is a great way to encourage compliance
  • When designing your integration, evaluate your business applications to determine which one will serve as your system of record (or “master”) for the synchronization process. The system of record can be a different system for different business processes
  • Use Workflow, Validation Rules, and Force.com code (Apex) to enforce critical business processes
  • Use in-built Salesforce Duplicate Rules and Matching Rules mechanisms
You can find more info about Data Management Plan on Trailhead.
Other imporant terms:
  • Data Governance – refers to the overall management of the availability, usability, integrity, and security of the data employed in an enterprise. A sound data governance program includes a governing body or council, a defined set of procedures, and a plan to execute those procedures
  • Data Stewardship – management and oversight of an organization’s data assets to help provide business users with high-quality data that is easily accessible in a consistent manner




 

Friday, 12 July 2019

How to listen to Salesforce Platform Events from MuleSoft?

Platform Event in Salesforce:

 


Sample Flow:


 


Replay Channel:


 



Transform Message:


 




Logger:


 


Code to execute in Developer Console:


Below code is used to create an event record so that MuleSoft can get notified.  
  
  1. Sample__e objEvent = new Sample__e( Status__c = 'Testing' );  
  2. EventBus.publish( objEvent );  


Output:


    

Getting Started With MuleSoft

What is Mule?

Mule, the runtime engine of Anypoint Platform, is a lightweight Java-based enterprise service bus and integration platform that allows developers to connect applications together quickly and easily, enabling them to exchange data.

What is middleware.

Software that acts as a bridge between and operating system or database and applications, especially on a network.

What is SOA?

Service Oriented Architecture is a set of principles and methodologies to design and develop well-defined business functionalities that are built as software components that can be reused.

What is an ESB?

An Enterprise Service Bus implements a communication system between mutually interacting software applications in a service-oriented architecture(SOA).

What is an API?

An API defines what you can call, what you send it, and what you get back.

What is a Web Service?

The actual API implementation you can make calls to or the interface of that API implementation.
A web service is a method of communication that allows two software systems to exchange data over the internet.

What is an API Proxy?

An application that controls access to a web service, restricting access and usage through the use of an API gateway.

What are the parts of a web service?

i. Web Service API
Describes how you interact with the web service.
ii. Web Service interface implementing the API
Is the code providing the structure to the application so it implements the API.
iii. The Web Service implementation itself
Is the actual code and application.

Define JSON?

A lightweight data-interchange format.

What is an API Portal?

When a REST API is added to Exchange, an API portal is automatically created for it.

An API portal has
i. Auto-generated API documentation
ii. An API Console for consuming and testing APIs
iii. An automatically generated API endpoint that uses a mocking service to allow the API to be tested wthout having to implement it.

REST Connectors in Anypoint Exchange

When a RAML 1.0 API specification is added to Exchange, a connector is automatically created for it.
i. The connector can be used in Mule applications to make calls to that API.
ii. REST Connect is the name of the technology that performs this conversion.

Flow Designer

Web app for building integration apps that connect systems and consume APIs.

API Designer

Web app for designing, documenting and mocking APIs.

Anypoint Studio

Desktop IDE for implementing APIs and building integration applications.

MUnit

MUnit is a Mule app testing framework for building automated tests.
MUnit is fully integrated with Anypoint Studio.

RAML

RESTful API Modeling Language.
A simple, strutured and succinct way of describing RESTful APIs.
RAML files can be used to auto-geerate documentation, mocked endpoints, interfaces for API implemenations and more.

RAML Syntax

RAML is based on broadly-used standards such as YAML and JSON.
Uses a human-readable data serialization format where data structure hierarchy is specified by indendation.

Friday, 28 June 2019

What is the most efficient way in Visualforce to show information based on data filters defined by an end-userfor a large volume of data?

A. Use an Apex controller to refine raw data based on data filters and store the result in a transient variable.
B. Use an Apex controller to refine raw data based on data filters and store the result in a snauc variable.
C. Use the rendered condition in Visualforce to limit data based on data filters.
D. Use filter conditions in a SOQL query to limit data based on data filters.

Ans: D. Use filter conditions in a SOQL query to limit data based on data filters

What is the optimal functionality in the Developer Console to count the number of calls made to themethod? A developer has a Debug method within a class, which is invoked hundreds of times.

A. The “Execution Log” Panel.
B. The “Execution Stack” Panel.
C. The “Executed Units” tab under the Execution Overview Panel.
D. The “Execution Tree” tab under the Stack Tree Panel.
This question is part of PD2

Ans : The “Executed Units” tab under the Execution Overview Panel

Friday, 16 March 2018

Type of events into Salesforce Lightning component

1. What are the type of events into Salesforce Lightning component?
a. Application Event – Scope of this event is throughout the lightning App and any component which has registered for this event would get a notification.
b. Component Event– Scope of this event is within itself or the parent component of this event, all the components declared within the parent component would get notified of this event.
c. System Event- these are the events fired by Salesforce’s system during the lifecycle of the lightning app.
2. What are the basic differences between Application Event and Component Event?
Component events are used to do communication between child and parent. They use bubbling and capture same as used in DOM events. A change in a child component can be communicated to the parent component via component event.
Application events are used to communicate any change in the component to a broader audience. Any component who has registered for this event will get a notified.
To use Component Event API we use the below syntax

Thursday, 8 February 2018

System.LimitException: Apex CPU time limit exceeded

The Apex CPU time limit exceeded error is a standard Salesforce error which occurs when the salesforce governor limit to run the Apex code has exceeded.The maximum CPU time to run the Apex code on the Salesforce servers is:
  • ​10,000 milliseconds (Synchronous limit)  
  • 60,000 milliseconds (Asynchronous limit)
below are the methods where we can get the CPU time and CPU limit.

Limits.getCPUTime() - Returns the CPU time(in milliseconds) accumulated on the salesforce.com server in the current transaction.

Limits.getLimitCPUTime() - Returns the total CPU time (in milliseconds) accumulated on the salesforce.com servers in the current transaction.


Example :

 Below code error is coming due to FOR inside FOR loop.
Set<String> setDependantValue = new Set<String>();
        for(Payment_Process__c objPicklistValues : lstProduct_Line){
            setDependantValue.add(objPicklistValues.Payment_Name__c);
        }
        Map<String, List<String>> mapDependantControllingValue = new Map<String, List<String>>();
        for(String objDepVal : setDependantValue){
            List<String> lstControllingValues = new List<String>();
            for(Payment_Process__c objPicklistValues : lstProduct_Line){
                if(objDepVal == objPicklistValues.Payment_Name__c){
                    lstControllingValues.add(objPicklistValues.Product_Family_Name__c);
                }
            }
            mapDependantControllingValue.put(objDepVal, lstControllingValues);
        } 


Solution : 
 Issue is resolved by following optimized code.
 Map<String, List<String>> mapDepValContVal = new Map<String, List<String>>();
        for(Payment_Process__c prdLine : lstProduct_Line){
            List<String> lstControllingValues = mapDepValContVal.get(prdLine.Line__c);
            if(lstControllingValues == null)
                lstControllingValues = new list<String>();
            lstControllingValues.add(prdLine.Family__c);
            mapDepValContVal.put(prdLine.Line__c, lstControllingValues);
        } 

How to register, fire and handle a component and application event?

We register an event by by using the following code:

<aura:registerEvent name=”sampleComponentEvent” type=”c:compEvent”/>

We fire event as shown below:
var compEvent = cmp.getEvent(“sampleComponentEvent”);

compEvent.fire();

Handle component event as below :

<aura:handler name=”sampleComponentEvent” event=”ns:eventName”

    action=”{!c.handleComponentEvent}” phase=”capture” />

Handle Application event as below:
<aura:handler event=”c:appEvent” action=”{!c.handleApplicationEvent}”/>





Lightening interview questions 2018

Please refer below link :
http://www.salesforcenextgen.com/salesforce-lightning-interview-questions-2018/amp/

Tuesday, 6 February 2018

Lightening Component Demo

Please refer below link :
https://lightningdart.com/demo.html

Building Custom “Loading..” Spinners In Lightning Components

Please refer Salesforce Developers Blog link :

https://developer.salesforce.com/blogs/developer-relations/2015/06/svg.html

Salesforce Lightning Interview Questions

1. What are the different types of Lightning events?

  • Browser: browser notifications that are triggered by user interaction with an element. Eg. onClick
  • System: fired by LC framework during LC lifecycle. They notify component states. Eg. init, render, afterRender
  • Navigation: force:navigateToURL, force:createRecord, force:editRecord
  • Component: A component event is fired from an instance of a component. A component event can be handled by the component that fired the event or by a component in the containment hierarchy that receives the event.
  • Application: Application events follow a traditional publish-subscribe model. An application event is fired from an instance of a component. All components that provide a handler for the event are notified.


2. How to register, fire and handle a component and application event?
<aura:registerEvent name="componentEventFired" type="c:compEvent"/>
<aura:registerEvent name="appEvent" type="c:appEvent"/>

var compEvents = cmp.getEvent("componentEventFired");
compEvents.setParams({ "context" : parentName });
compEvents.fire();

var appEvent = $A.get("e.c:appEvent");
appEvent.setParams({ "context" : parentName });
appEvent.fire();
...
...
...
...
...
<aura:handler event="c:appEvent" action="{!c.handleApplicationEventFired}"/>
<aura:handler name="componentEventFired" event="c:compEvent" 
 action="{!c.handleComponentEventFired}"/>

{
 handleComponentEventFired : function(cmp, event) {
  var context = event.getParam("context");
 },

 handleApplicationEventFired : function(cmp, event) {
  var context = event.getParam("context");
 }
}
For more details, check the link below:
http://hellosnl.blogspot.in/2017/06/lightning-advanced-events-example.html


3. Let's say that you have an app myApp.app that contains a component myCmp.cmp with a ui:button component. During initialization, the init() event is fired in what order?
Answer: ui:button, ui:myCmp, and myApp.app.


4. Why do we use @AuraEnabled annotation?
  • Use @AuraEnabled on Apex class static methods to make them accessible as remote controller actions in your Lightning components.
  • Use @AuraEnabled on Apex instance methods and properties to make them serializable when an instance of the class is returned as data from a server-side action

5. Why do we use $A.enqueueAction(action)?
It adds the server-side controller action to the queue of actions to be executed. Rather than sending a separate request for each individual action, the framework processes the event chain and batches the actions in the queue into one request. The actions are asynchronous and have callbacks.


6. What is Namespace?
It is used to group related components together.


7. What is LockerService?
It enhances security by isolating Lightning components in their own namespace. A component can only traverse the DOM and access elements created by a component in the same namespace.


8. Examples of how to use some of the out-of-the-box events to enable component interation within your Lightning components?
$A.get("e.force:refreshView").fire(): reloads all data for the view.

createRecord : function (component, event, helper) {
    var createRecordEvent = $A.get("e.force:createRecord");
    createRecordEvent.setParams({
        "entityApiName": "Contact"
    });
    createRecordEvent.fire();
}

editRecord : function(component, event, helper) {
    var editRecordEvent = $A.get("e.force:editRecord");
    editRecordEvent.setParams({
         "recordId": component.get("v.contact.Id")
   });
    editRecordEvent.fire();
}


9. What is Lightning CLI?
It is a Heroku Toolbelt plugin that lets you scan your code for general JavaScript coding issues and lightning-specific issues.


10. Difference between bound and unbound expressions.
Bound expression {!expression}
  • Any change to the value of the childAttr attribute in c:child also affects the parentAttr attribute in c:parent and vice versa.
  • When you use a bound expression, a change in the attribute in the parent or child component triggers the change handler in both components.
Unbound expression {#expression}
  • Any change to the value of the childAttr attribute in c:child doesn’t affect the parentAttr attribute in c:parent and vice versa.
  • When you use an unbound expression, the change is not propagated between components so the change handler is only triggered in the component that contains the changed attribute.
For more details, check this link: http://hellosnl.blogspot.in/2017/05/data-binding-between-components.html


11. Use of THIS CSS class?
This adds namespacing to CSS and helps prevent one component's CSS from blowing away another component's styling.


12. How to set the value of an inherited attribute?
Use the <aura:set> tag.


13. What are the different ways to conditionally display markup, and what is the preferred approach?
Using the <aura:if> tag
Use CSS to toggle visibility of markup by calling $A.util.toggleClass(cmp, 'class') in JavaScript code.


14. What is $Resource global value provider? Is it possible to obtain a reference to a static resource in Javascript code?
It lets you reference images, style sheets, and JavaScript code you’ve uploaded in static resources.
To obtain a reference to a static resource in JavaScript code, use $A.get('$Resource.resourceName').
For more details, check this link http://hellosnl.blogspot.in/2017/04/lightning-using-static-resources.html


15. Let’s say you have several buttons that reuse the same onclick handler. How will you retrieve the name of the button that fired the event?
http://hellosnl.blogspot.in/2017/05/which-button-was-pressed.html


16. What are the names of interfaces that are added to a Lightning component to allow it to be used as custom tabs, and to be used in Lightning and Community builder?
http://hellosnl.blogspot.in/2017/05/configuring-lightning-components.html


17. What is the use of force:hasRecordId interface?
Add the force:hasRecordId interface to a Lightning component to enable the component to be assigned the ID of the current record.
The recordId attribute is set only when you place or invoke the component in a context of a record. For example, when you place the component on a record page, or invoke it as an action from a record page or object home. In all other cases, such as when you create this component programmatically inside another component, recordId isn’t set, and your component shouldn’t depend on it.


18. How to delete a design attribute for a component that implements the flexipage:availableForAllPageTypes or forceCommunity:availableForAllPageTypes interface?
First remove the interface from the component before deleting the design attribute. Then reimplement the interface. If the component is referenced in a Lightning page, you must remove the component from the page before you can change it.


19. How to add Lightning components to your Visualforce pages?
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm

Access SOQL data in Lightning component

public class AccountContactController {
    @AuraEnabled
    public static List<Account> fetchAccount() {
        List<Account> listOfAccounts = [SELECT Name, AnnualRevenue, 
        BillingState, 
      (SELECT LastName FROM contacts) FROM Account LIMIT 10];
        return listOfAccounts;
    }
}
 
<aura:component controller="AccountContactController">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="Accounts" type="Account[]"/>
    <ul>
        <aura:iteration items="{!v.Accounts}" var="account">
       <li>AccountName: {!account.Name}</li>
        <ul>
        <aura:iteration items="{!account.Contacts}" var="contact"  
        indexVar="index">
        <li>Contact {!index + 1} : {!contact.LastName}</li>
        </aura:iteration>
            </ul>
            <hr/>
        </aura:iteration>
    </ul>
</aura:component> 
 
 
 
({
    doInit: function(component, event, helper) {
        var action = component.get('c.fetchAccount');
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
          component.set('v.Accounts', response.getReturnValue());
            }
        });
        $A.enqueueAction(action);
    }
}) 

AuraHandledException in Lightening

From Apex class:

    @AuraEnabled
    public static List<Account> fetchAccount() {
        throw new AuraHandledException('User-defined error');
    }
  From client-side controller:
  doInit: function(component, event, helper) {
        var action = component.get('c.fetchAccount');
        action.setParams({ firstName : cmp.get("v.firstName") });
        action.setCallback(this, function(response) {
        var state = response.getState();
        if (state === "SUCCESS") {
        component.set('v.Accounts', response.getReturnValue());
        }
        else if (component.isValid() && state === "ERROR") {
     console.log("Error Message: ", response.getError()[0].message);
        }
        });
        $A.enqueueAction(action);
    } 

LockerService: DOM Access Containment

LockerService enhances security by isolating Lightning components in their own namespace. Due to this, a component can only traverse the DOM and access elements created by a component in the same namespace. Let’s look at a sample component that demonstrates DOM containment.


<!--c:domLocker-->
<aura:component>
    <div id="myDiv" aura:id="div1">
        <p>See how LockerService restricts DOM access</p>
    </div>
    <lightning:button name="myButton" label="Peek in DOM"  
    aura:id="button1" onclick="{!c.peekInDom}"/>
</aura:component>

({ /* domLockerController.js */
    peekInDom : function(cmp, event, helper) {
        console.log("cmp.getElements(): ", cmp.getElements());
        // access the DOM in c:domLocker
        console.log("div1: ", cmp.find("div1").getElement());
        console.log("button1: ", cmp.find("button1"));
        console.log("button name: ",
        event.getSource().get("v.name"));

        // returns an error
        //console.log("button1 element: ", 
         cmp.find("button1").getElement());
    }
})

You can't use cmp.find("button1").getElement() to access the DOM element created by <lightning:button>. LockerService doesn't allow c:domLocker to access the DOM for <lightning:button> because the button is in the lightning namespace and c:domLocker is in the c namespace.

So, use cmp.find("myInput").get("v.name") instead of cmp.find("myInput").getElement().name. The latter doesn’t work if you don’t have access to the component, such as a component in another namespace.

Monday, 13 November 2017

Component Event Vs Application Event in Lightening

Please refer below link for better understanding of events in Lightening

http://reidcarlberg.github.io/lightning-newbie/events.html

Monday, 6 November 2017

When using Future calls in Apex in Salesforce

1) A future call cannot make another future call and a future call cannot be made from a batch job.
With this limitation you have to be very careful in your code that a future call is not made from within a future call. This can be very easy if the code is short or you are doing a simple web service call as described above. But if you have a complex set of triggers or workflow rules in an organization it may not be that simple.
2) Future calls cannot be guaranteed to run in a certain order.
Just because one future call was made before another future call does not mean that the first one will complete first. There are multiple queues that are running these future calls so the order cannot be guaranteed. So if you need to guarantee that actions complete in a certain order then a batch or scheduled job may be the better solution.
3) Future calls can run concurrently.

It is possible that two future methods that were executed one after the other could basically run concurrently. This means you may have to deal with record locking if these two methods could be updating the same record. This may force you to use the ‘For Update’ method on your SOQL queries, which can be difficult to troubleshoot.
4) Future calls have limits

Salesforce has limits on how many future calls can be made so they cannot be used just anywhere. There is a limit of 10 future calls per Apex invocation. There is also the limit of future calls in a 24 hour period, which is 250,000 or the number of user licenses in your organization multiplied by 200, whichever is greater. Here is a link to those limits.
Future calls have their place to solve very specific use cases. But as Salesforce developers we have to be very careful in how we use them or we will end up with code that is difficult to debug and hard to manage.

Queueable VS @future

This article is going to compare the @future and Queueable Interface.

@future Methods:
A future method runs asynchronously. And its governor limits are higher:



DescriptionSynchronous Limit Asynchronous Limit
Total number of SOQL queries 100 200
Total heap size 6MB 12MB
Maximum CPU time 10,000 milliseconds 60,000 milliseconds


When to use it:
  1. Long-running operations (callouts to external web service)
  2. Separating mixed DML operations (i.e. inserting a user with a non-role must be done in a separate thread from DML operations on other sObjects)
How to define it:

   Global class FutureClass{
         @Future(Callout=true)
             public static voidmyFutureMethod(){
                  // Perform your logic ...
             }
}

  1. future anotation
  2. Must be static and return void
  3. Specify (callout=true) to allow callouts
Limits: 

  1. Parameters passed in can be only of Primitive type
  2. Cannot chain @future method
  3. Cannot get the job ID
Queueable Interface:

This interface enables you to add jobs to the queue and monitor them which is an enhanced way of running your asynchronous Apex code compared to using future methods.
Like @future, a benefit of using the Queueable interface is that some governor limits are higher than synchronous Apex (see the table above).

When to use it comparing with @future:
  1. Chaining jobs
  2. Asynchronous monitoring (it gets job ID)
  3. Using non-primitive types


Public class AsyncExecutionExample implements Quaueable ,Database.allowcallouts{
    Public void exccute (QuaueableContext context){
      // Perform your operation here ...
    }
}

Much like what we did on using batchable interface
  1. Implement the Queueable interface
  2. Define execute() method
  3. Chain this job to next job by submitting the next job
  4. Implement the Database.AllowsCallouts interface to allow callouts
Limits:
  1. When chaining jobs, you can add only one job from an executing job with System.enqueueJob.
  2. Cannot have more than 1 job in the chain that does callouts.


 
 

Friday, 27 October 2017

Salesforce Integration Interview Questions

Integration Questions & Answer:


1. what is integration ?
A. Integration is a process of connecting two applications
2. what is webservices ?
A. Webservices is a functionality or code which helps to us to do integration.
3. what is Protocal ?
A. Protocal is contains set of instructions or rules.
4. How many types of API’s avaliable in salesforce ?
A. SOAP API, REST API, Bulk API and Streaming API.
5. What is Call In and Call Out?
A. Call In is used to exposing our webservices to another users
Call Out is used to invoking or consuming our webservices to others.
6. What is WSDL ?
A. WSDL stands for Webservices Description Langugage.
It contains types, messages,port types and Binding.
7. How SOAP can be accessed ?
A. SOAP can be communicate through WSDL file, without WSDL file we can’t do integration.
Message format in SOAP is XML
8. How to do callout integration ?
A. Generate WSDL code from class
Path: setup-develop -apex class
9. Limitataions of WSDL file ?
A. File must be in .WSDL extenstion.
Multiple port types and binding will not allowed
Import and Inheritance operations are not supported.
10. What is remote site settings ?
A. Remote site settings is used to authorize the endpoint and allow us to whom integrate(end user)
11. How manys ways to XML parsing ?
A. They are two ways of XML parsing
1. XML streams
2. XML DOM
12. How to read root element in XML DOM ?
A. getroot element
13.How to read child element in XML DOM ?
A. getchild element
14.How to read all child elements in XML DOM ?
A. getchild elements
15. How to read text between tags ?
A. gettext
16. How SOAP and REST will Communicate ?
A. SOAP will communicate through WSDL file
REST will communicate through HTTP file
17. what are methods in REST
A. HTTPGET, HTTPPUT, HTTPPOST and HTTPDELETE
18. How REST can be accessed or which message format REST supports ?
A. REST supports both XML and JSON
19. What is JSON ?
JSON stands for JavaScript Object Notation. JSON is light weighted than XML

Salesforce lightning interview question and answers

Lightening Questions & Answer:

Q. What is Lightning component framework ?
A. Lightning component framework is UI framework which helps to design dynamic web apps to mobile and desktop with high responsive
Q. what is use of Lightning component framework ?
A. Lightning component framework helps to design out of box components with rich ecosystem and high performance. It is also Event-Driven architecture
Q. what are component in Salesforce Lightning ?
A. Components is a piece of code which helps to reusable to anywhere we want.
Q.Which Framework Lightning Supports ?
A. Lightning Supports component-based framework.
Q. How many types of events available ?
A. Component Event are managed by the component itself.
Application Event are handled by all components that are applying to the event. These events are essentially a traditional publish-subscribe model.
Q.What is Aura ?
A. Aura framework is builts Lightning Component framework and it helps to by apps
Q.what is SLDS stands for ?
A. Salesforce Lightning Design System
Q.What is Lightning Bundle ?
A.Lightning Bundle contains Component,Controller,Helper,style,documentation,rerender,design,SVG with it.
Q. To design Lightning components, Do we need to create a custom domain ?
A. Yes, we need to custom domain to built lightning component. By using custom domain helps use to make our organization more secure while authentication.
Q.Is it mandotary to create custom namespaces to develop lightning components ?
A. No, It’s Optional
Q. Can we access one lightning component on another lightning component in salesforce ?
A. Yes, We can able to access by using
Q. Can we access one javascript controller method on another controller method in salesforce lightning component ?
A. No, we can’t able to access
Q. Can we access one javascript helper method on another helper method in lightning Component ?
A. Yes,We can able to access
Q. Can we use external libraries in components ?
A. Yes, Lightning component supports various libraries such as Bootstrap,Gruntjs,angularJS ….
Q.By which interface helps us to show component in lightning Tabs ?
A. by adding implements=”force:appHostable”.It helps us to a component display in lightning Tabs.
Q.By which interface helps us to show component in lightning Record home page ?
A. by ading implements=”flexipage:availableForRecordHome,force:hasRecordId” and access=”global”
we can use record home page in Lightning Experience.
Q. How to make quick lightning action ?
A. with embedding script into our code implements=”force:lightningQuickAction”
Q.What are component Naming Rules in Salesforce Lightning ?
A These are Naming Rules in Salesforce Lightning
• Must begin with a letter
• Must contain only alphanumeric or underscore characters
• Must be unique in the namespace
• Can’t include whitespace
• Can’t end with an underscore
• Can’t contain two consecutive underscores
Q.How to use static resources in Lightning Application ?
A. we need show name which is stored in our static resource.
Q. What are value providers in Salesforce Lightning ?
A. Value providers helps use to access data in Lightning Application .They are two value providers as v(View) and c(controller)
v is component attribute set which helps to access component attribute values in markup
c is component controller helps us to link with event handlers and action for the component
Q. List of Global value providers ?
A. globalID
$Browser
$Label
$Locale
$Resource
Q.what is Custom Label ?
A. Custom Label helps to create multilingual applications by user language
Syntax : $A.get(“$Label.namespace.labelName”)
Q. How to add a button in Salesforce Lightning ?
A. lightning:button
Q. How to make button to work on click in Salesforce Lightning ?
A. ui:button
Q. What are list of tools are avaliable in salesforce lightning ?
A. Lightning Connect
Lightning Component Framework
Lightning Schema Builder
Lightning Process Builder
Lightning App Builder
Q.what is locker service in Salesforce Lightning ?
A. LockerService is a powerful security architecture for Lightning components. It enhances security by isolating Lightning components in their own namespace.
Q. What is @AuraEnabled ?
A. @AuraEnabled is helps to access methods in Lightning.
Q. what is Lightning Data Service in Salesforce Lightning?
A. Lightning Data Service helps to create, edit, delete and loads in component without help of apex and it shares filed level security and sharing rules to us.
Q. What is Lightning Container in Salesforce Lightning ?
A. By Lightning Container, we can access third party framework such as angularJS , reactJS. To access those developed app need to store in static resource.
Q.Which chorme extenstion helps us to debug lightning applications ?
A. Salesforce Lightning Inspector

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