Salesforce Certified Application Architect

Sunday, 17 May 2015

Synchronous and Asynchronous calls using Apex in Salesforce

Apex can be executed synchronously or asynchronously.



Synchronous:

In a Synchronous call, the thread will wait until it completes its tasks before proceeding to next. In a Synchronous call, the code runs in single thread.

Example:

Trigger
Controller Extension
Custom Controller


Asynchronous:

In a Asynchronous call, the thread will not wait until it completes its tasks before proceeding to next. Instead it proceeds to next leaving it run in separate thread. In a Asynchronous call, the code runs in multiple threads which helps to do many tasks as background jobs.

Example:

Batch
@future Annotation

Cheers!!!

Friday, 17 April 2015

Salesforce interview question

You can refer the below link

http://www.srinusfdc.com/p/interview-questions.html

Thursday, 9 April 2015

When should I use SOAP and When should I use REST?

  • USE SOAP when:
    • When the 2 applications are talking to each other need to know in-advance what the contract is going to be.
    • Deals with larger amount of data or Bulk Data or batch
    • Doing more Business to Business type application.
  • USE REST API when:
    • It is a lightweight protocol
    • It does not have an envelope or big header.
    • It is used in mobile-application.

Wednesday, 1 April 2015

When you get the error “Non-selective query against large object type”? how to resolve it

When you get the error “Non-selective query against large object type”? how to resolve it


Whenever an object has greater than 100K records any query on that object must be “selective”. For a query to be selective it must have enough indexed filters (where clauses) so that less than 10% of the records (in our example 10K) are returned before applying the limit statement

Below are some good examples of selective queries for a little inspiration.
Example 1
SELECT Id FROM Contact WHERE Id In ('00Q6000000nuyL2EAI','00Q6000000iyBBhEAM','00Q6000000j007MEAQ')
Example 2
SELECT Id FROM Lead WHERE Email != ' '
This one is a trick. Email is an indexed field on Lead but if you look at my WHERE clause, this is going to return darn near all the Leads. So, I didn't reduce this record set by much and thus this reverts to a 'non-selective' query. 
SELECT Id FROM Lead WHERE Email != ' ' and Status = 'Open' and Owner Id in  ('005d0000001btXoAAI', '005d0000002X1AqAAK') 

Wednesday, 4 March 2015

How to use External Lookup Relationship Fields on External Objects

An external lookup relationship links a child standard, custom, or external object to a parent external object.
When you create an external lookup relationship field, the values of the standard External ID field on the parent external object are matched against the values of the external lookup relationship field. For a child external object, the values of the external lookup relationship field come from the specified External Column Name.

Example

In this screenshot, a record detail page for the Business_Partner external object includes two related lists of child objects. This example shows how external lookup relationships and page layouts enable users to view related data from within and from outsideSalesforce on a single page.
  • Account standard object (1)
  • Sales_Order external object (2)

Monday, 2 March 2015

Winter 15 maintenance Release Development exam Questions


1) A tabular report can be used as the source report for which Dashboard component?
 A. Stacked Bar Chart
B. Metric
C. Table
D. Gauge

2) Universal Containers uses a custom object to track open job positions and would like to send an automatic email to the hiring manager when a position is moved to the closed stage. What can be used to accomplish this?
A. Workflow rule
B. Escalation rule
C. Cross-object formula
D. Auto-response rule

3) What is a capability of Advanced Setup Search?            Choose 2 answers
 A. See which object an item is associated with in the Setup search results.
B. Enter search criteria using wildcard characters, such as an asterisk (*).
C. Search for individual Setup items, such as workflow rules, by name.
D. Bookmark specific items listed in the Setup search results.

4) What is a feature of unlisted groups in Chatter?           Choose 2 answers
 A. Users can ask for permission to join unlisted groups.
B. Users with the Modify All Data permission can access unlisted groups.
C. Users with the Manage Unlisted Groups permission can access unlisted groups.
D. Members of an unlisted group can view the group in list views and search results.

5) Users at Universal Containers often need to update the Status and Amount of an opportunity using the Salesforce1 mobile application. How can this common update be expedited?              Choose 2 answers
 A. Create a custom action on the Opportunity object using a Visualforce page.
B. Create a global update action on the Chatter feed.
C. Create an object-specific update action on the Opportunity object.

D. Create a mobile-only page layout for the Opportunity object.

Tuesday, 17 February 2015

How auto-assignment should take plae through trigger

The maximum number of cases an agent can have pending is 12. Once the pending case falls below 12 the auto-assignment should take place.


trigger test on Case (after insert) {

List<Id> caseIds = new List<Id>{};
integer intcount=0;
for (Case theCase:trigger.new)
caseIds.add(theCase.Id);

List<Case> cases = new List<Case>{};

AggregateResult[] counts = [SELECT count(id)calls FROM Case  WHERE OwnerId=:UserInfo.getUserId() GROUP BY OwnerId];
for(AggregateResult c : counts  )
{
intcount =integer.valueof(c.get('calls'));
System.debug('intcount ==>'+intcount );
if(intcount <12)  {
Database.DMLOptions dmo = new Database.DMLOptions();

dmo.assignmentRuleHeader.useDefaultRule = true;
c.setOptions(dmo);

}

else{
c.AddError('Does not allow' );

}              
//cases.add(c);
System.debug('cases===>'+cases.size());


}

Database.upsert(cases);
}

Cheers..

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