UrbanPro
true

Learn Salesforce Certification from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Learn Salesforce Certification with Free Lessons & Tips

Ask a Question

Post a Lesson

All

All

Lessons

Discussion

Answered on 20/01/2021 Learn Salesforce Certification +5 SAP Salesforce Developer Salesforce Lightning Experience SAP ABAP SAP A2A

Nikhil Bajaj

Software Professional with 15+ Vast experience

Obviously, Salesforce is growing fast and have good career opportunities.
Answers 16 Comments
Dislike Bookmark

Answered on 16/05/2018 Learn Salesforce Certification

Devika Goel

Salesforce Trainer

Hello Subash, My name is Devika. I have total of 4.5 Yrs of Experience as Salesforce Consultant. I have worked on Several Projects. Its good if you want to start your career in Salesforce. Its very high in Demand now a days. Currently I am working as Freelancer as Salesforce Trainer and Training 5 Candidates... read more

Hello Subash,

My name is Devika. I have total of 4.5 Yrs of Experience as Salesforce Consultant. I have worked on Several Projects. Its good if you want to start your career in Salesforce. Its very high in Demand now a days. 

Currently I am working as Freelancer as Salesforce Trainer and Training 5 Candidates Online. If you are interested you can revert me with your email ID on this.

Thanks

read less
Answers 7 Comments 3
Dislike Bookmark

Lesson Posted on 05/08/2017 Learn Salesforce Certification +2 Salesforce Developer Salesforce Administrator

What Are The Map Methods Available In Apex?

Kumar

I am a working professional in mnc company I have 3 years of experience in giving salesforce admin development...

//Map holds key and value pair. //Syntax: Map mapName = new Map(); /*Map countryISTCodeMap = new Map(); countryISTCodeMap.put('India','91'); countryISTCodeMap.put('USA','001'); countryISTCodeMap.put('India','911');//replaces old value with new value.*/ Map countryISTCodeMap = new Map{'India'=>'91','USA'=>'001',... read more

//Map holds key and value pair.

//Syntax: Map mapName = new Map();

/*Map countryISTCodeMap = new Map();

countryISTCodeMap.put('India','91');

countryISTCodeMap.put('USA','001');

countryISTCodeMap.put('India','911');//replaces old value with new value.*/

Map countryISTCodeMap = new Map{'India'=>'91','USA'=>'001', 'India'=>'911'};

system.debug('countryISTCodeMap result: '+countryISTCodeMap+' with size '+countryISTCodeMap.size());

system.debug('countryISTCodeMap keys: '+countryISTCodeMap.keyset());

system.debug('countryISTCodeMap values: '+countryISTCodeMap.values());

system.debug('countryISTCodeMap search: '+countryISTCodeMap.containsKey('India'));

system.debug('countryISTCodeMap fetching value based on key: '+countryISTCodeMap.get('India'));

//map keys are case-sensitive.

keyset(): To fetch only keys from the map.

values(): To fetch only values from the map.

containsKey(value): To search a key from the map.

get(key): By supplying the key we can fetch the value.

put(key,value): To add key and value in a map.

read less
Comments
Dislike Bookmark

Learn Salesforce Certification from the Best Tutors

  • Affordable fees
  • Flexible Timings
  • Choose between 1-1 and Group class
  • Verified Tutors

Lesson Posted on 05/08/2017 Learn Salesforce Certification +2 Salesforce Administrator Salesforce Developer

What Is SOQL And SOSL?

Kumar

I am a working professional in mnc company I have 3 years of experience in giving salesforce admin development...

1. SOQL: Salesforce Object Query Language SOQL: Salesforce Object Query Language SOQL Purpose: To fetch info. from an object and related objects. We can write query on one object while querying on those objects we can fetch the child object info. or parent object info. (we cannot capture un... read more

1. SOQL: Salesforce Object Query Language

  • SOQL: Salesforce Object Query Language
  • SOQL Purpose: To fetch info. from an object and related objects.
  • We can write query on one object while querying on those objects we can fetch the child object info. or parent object info. (we cannot capture un related objects info.)
  • SOQL queries per transaction: 100.
  • SOQL query rows returned: 50000.

 

2. SOSL: Salesforce Object Search Language

  • SOSL: Salesforce Object Search Language.
  • SOSL Purpose:We can search for a value in multiple objects (no need of any relationship).
  • Results of SOSL query can be stored in List of List.
  • SOSL queries per transaction: 20.
  • SOSL query rows returned: 2000.

 

read less
Comments
Dislike Bookmark

Lesson Posted on 05/08/2017 Learn Salesforce Certification +2 Salesforce Administrator Salesforce Developer

Difference Between Insert/Update And Database.Insert/ Database.Update

Kumar

I am a working professional in mnc company I have 3 years of experience in giving salesforce admin development...

insert/update Database.insert/Database.update Assume that you are inserting 100 records. If any one of the record fail due to error then entire operation will fail. None of the records will be saved into the database. with insert/update if we use try-catch then we can capture only one error which will... read more

insert/update

Database.insert/Database.update

Assume that you are inserting 100 records. If any one of the record fail due to error then entire operation will fail. None of the records will be saved into the database. with insert/update if we use try-catch then we can capture only one error which will cause to stop the operation.

Assume that you are inserting 100 records. If any one of the record fail due to error then it will perform partial operation (valid records will be inserted/updated) if we use Database.insert(list,false)/ Database.update(list,false).

.with Database.insert/Database.update we can capture all the errors by saving result in Database.saveResult[].

read less
Comments
Dislike Bookmark

Lesson Posted on 05/08/2017 Learn Salesforce Certification +2 Salesforce Administrator Salesforce Developer

When To Use Before Triggers And When To Use After Triggers?

Kumar

I am a working professional in mnc company I have 3 years of experience in giving salesforce admin development...

1. Before Triggers: To perform the validations we should use before triggers. If you are updating any field on the same object on which you are writing the trigger and no need to explicitly include the DML statemetns (already due to DML operation only trigger fire and it is still in progress at this... read more

1. Before Triggers:

To perform the validations we should use before triggers.

If you are updating any field on the same object on which you are writing the trigger and no need to explicitly include the DML statemetns (already due to DML operation only trigger fire and it is still in progress at this point of time.)

2. After Triggers:

If you are dealing with relationship records and if you need record id in these situations we should use after trigger (in before insert record doesn't contain the record id).

3. For the same event if there are multiple triggers on the object, how to control the order of execution?

We cannot control the order of execution in this situation. It is recommended to have only one trigger per one object.

Note: We can keep the logic of the apex trigger in an apex class and can invoke from that class.

4. What are the recursive triggers and how to avoid?

If we perform update operation on the record in after update event logic recursive triggers will arise.

Using static boolean variable in an apex class (we should not keep static boolean variable inside of the trigger) we can avoid recursive triggers.

read less
Comments
Dislike Bookmark

Learn Salesforce Certification from the Best Tutors

  • Affordable fees
  • Flexible Timings
  • Choose between 1-1 and Group class
  • Verified Tutors

Lesson Posted on 05/08/2017 Learn Salesforce Certification +2 Salesforce Administrator Salesforce Developer

What is Mixed-DML-Operation Error And How To Avoid?

Kumar

I am a working professional in mnc company I have 3 years of experience in giving salesforce admin development...

If we perform DML operation on standard/custom object and global objects(User, UserRole, Group, GroupMember, Permission Set, etc...) in same transaction this error will come. To avoid this error, we should perform DML operation on standard/custom object records in a different transaction. In general... read more

If we perform DML operation on standard/custom object and global objects(User, UserRole, Group, GroupMember, Permission Set, etc...) in same transaction this error will come.

To avoid this error, we should perform DML operation on standard/custom object records in a different transaction.

In general all the apex classes and apex triggers execute synchronously (execute immediately).

If we perform DML operation on standard/custom object records asynchronously (execute in future context), we can avoid MIXED-DML-OPERATION error.

To execute logic asynchronously keep the logic in an apex method (in a separate apex class, not in same apex trigger) which is decorated with @future annotation.

See the below example:

Note: To analyse the code copy it and paste it in notepad for the convenience.

 public class TriggerUtility {

  /*                    

  1. Following future method execute asynchronously (whenever server is free it will execute in future context).

  2. We should not declare @future method in Apex Trigger.

  3. @future method should be always static.

  4. @future method accepts only primitive data types (Integer, String, Boolean, Date, etc...) as parameters and it won't accept

  non-primitive data types (sObject,Custom Objects and standard Objects etc.. ) as parameters.

  5. @future method should not contain return type. Always it should be void.

  6. From an apex trigger we can make only make asynchronous call outs. To make call out we should include "callout = true" beside the future @annotation.

  7. We cannot perform synchronous call outs from Apex Trigger.

  */

  //Below is the example for the future method -

  @future(callout = true)

  public static void processAsync(primitive parameters) {

   //Logic to insert/update the standard/custom object.

  }

 }

read less
Comments
Dislike Bookmark

Lesson Posted on 05/08/2017 Learn Salesforce Certification +2 Salesforce Developer Salesforce Administrator

What Is The Order Of Execution In Salesforce?

Kumar

I am a working professional in mnc company I have 3 years of experience in giving salesforce admin development...

We are creating validation rules, workflow rules, assignment rules, auto-responsive rules, escalation ruels and apex triggers etc. If the condition is same for all the rules which will execute first and which will execute next, for this salesforce provide the order. Order of execution in salesforce:... read more

We are creating validation rules, workflow rules, assignment rules, auto-responsive rules, escalation ruels and apex triggers etc.

If the condition is same for all the rules which will execute first and which will execute next, for this salesforce provide the order.

Order of execution in salesforce:

  • Prepare the record for insert/update operation.

  • It will replace all the old field values with new field values.

If the request is coming form UI all the system validations will execute:

  • DataType

  • Length

  • Required

  • Unique

  • PageLayot level validations

Before triggers:

Custom Validations and again system validation rules will fire (pageLayot level validations won't fire at this point of time).

Record will be saved into the database but doesn't not commit.

After triggers:

  • Assignment rules.

  • Auto-responsive rules.

  • Workflow Rules.

  • Incase of Workflow Rule Field updates again before triggers and after triggers fire one more time. System validation ruels for duplicate chcek.

  • Escalatoin Rules.

  • Rollup-Summary fields will be calculated.

  • Grant parent Rollup-Summary fields will be calculated.

  • Criteria base sharing evaluation.

  • Record will be commited into the database.

  • Post Commit logic (Sending emails).

read less
Comments
Dislike Bookmark

Lesson Posted on 05/08/2017 Learn Salesforce Certification +2 Salesforce Administrator Salesforce Developer

Following Custom Objects Are Available In The Organization: Interview Question For Salesforce

Kumar

I am a working professional in mnc company I have 3 years of experience in giving salesforce admin development...

ChildObject__c ParentObject__c Click to see the full question. Relationship between ChildObject__c and ParentObject__c objects is Lookup relationship. In case of lookup relationship if we delete the parent object record in child object only the relationship field value will be removed (child records... read more

 ChildObject__c

ParentObject__c

Click to see the full question.

Relationship between ChildObject__c and ParentObject__c objects is Lookup relationship.

In case of lookup relationship if we delete the parent object record in child object only the relationship field value will be removed (child records won't be deleted).

But client has a requirement to delete the child object records. How to achieve this?

Write an apex trigger to achieve this functionality.

We should take before delete event. If we take after delete relationship will broke up b/w parent and child object records.

Trigger ParentTrigger on ParentObject__c(before delete) {

   /*

Note:

  • For delete events only trigger.old and triggger.oldMap will be available.

  • trigger.old holds old versions of the records but if we mention that in SOQL query salesforce will automatically convert those records into ids.

   */

   List childLst = [select id, Parent_Object__c from ChildObject__c where Parent_Object__c in: trigger.old];  

   delete childLst;

  }

read less
Comments
Dislike Bookmark

Learn Salesforce Certification from the Best Tutors

  • Affordable fees
  • Flexible Timings
  • Choose between 1-1 and Group class
  • Verified Tutors

Lesson Posted on 05/08/2017 Learn Salesforce Certification +2 Salesforce Developer Salesforce Administrator

What Is Batch Apex And Its Methods ?

Kumar

I am a working professional in mnc company I have 3 years of experience in giving salesforce admin development...

1. We can call the apex code by creating object for the class (or) if the variables or methods are static then we can call with class name. Apex Code in the trigger will execute automatically for the DML operations. If you want to execute apex code on a specific time then we should write batch... read more

1. We can call the apex code by creating object for the class (or) if the variables or methods are static then we can call with class name.

  • Apex Code in the trigger will execute automatically for the DML operations.

  • If you want to execute apex code on a specific time then we should write batch class.

  • With Batch Apex we can process maximum of 50 million records.

  • Batch Apex is asynchronous (execute in future context).

  • While writing the batch class we should inherit Database.Batchable interface.

  • Database is a built in global class which contains inner global interface.

2. What are the Batch Apex methods?

Since we are inheriting Database.Batchable interface we should implement all the method prototypes declared in the interface.

 We should implement the following global methods:

  • Start: It will prepare the records to process and execute only one time.

  • Execute: It will take the records prepared in start method and split those records into batches and it will execute multiple times. For example if the start method is returning 1000 records then execute method executes 5 times if you don't mention the batch size (Default Batch Size is: 200). Maximum batch size is: 2000.

  • Finish: We can perform post commit logic like sending emails with the success or error information. It will execute only one time.

Batch Class Syntax:

//Database is Class provided by Salesforce.

//Batchable is an global interface which is inside of the Database class.

 //Batchable include 3 method prototypes: 1. Start 2. Execute 3. Finish

 //start and finish methods will execute only one time.

 //execute method executes multiple times.

 global class BatchUsage implements Database.Batchable , Database.Stateful {

  //at a time we can inherit multiple interfaces but we cannot inherit multiple classes.

  //By default batch class is stateless (variable info. store in one method cannot be remembered in other method),

  //to make it stateful we should inherit Database.Stateful interface.

  String name = '';

  global Database.queryLocator start(Database.BatchableContext bc) {

  //From asynchronous to asynchronous we cannot call

  //(from batch class we cannot call future mehthod vice versa.).

  name += 'start';

  system.debug('@@@Start Method: '+name);

   //Collects the records to process. It will forward these records to execute method.

   //If we use Iterable as return type for this start method it can hold

   //max. of 50k records only.

   //If we use Database.queryLocator as return type for this start method it can hold

   //max. of 50 million records.

   return Database.getQueryLocator('select id, name, Location__c from Department__c where Location__c = \'\'');

  }

  global void execute(Database.BatchableContext bc, LIST sObjLst) {

   name += 'execute';

   system.debug('@@@Execute Method: '+name);

  //Split the records forwarded by start method into batches.

  //Default batch size is: 200.

  //Max. batch size is: 2000.

  List depUPdLst = new List();

  for(SObject sObj: sObjLst) {

  Department__c dept = (Department__c) sObj;//Type Casting.

  dept.Location__c = 'Bangalore';

  depUPdLst.add(dept);

   }

   if(depUPdLst.size() > 0)

    update depUPdLst;

  }

  global void finish(Database.BatchableContext bc) {

   name += 'finish';

   system.debug('@@@Finish Method: '+name);

   //Post Commit logic like sending emails for the success or failures of the batches.

   AsyncApexJob a = [select id, Status, NumberOfErrors, JobItemsProcessed,

   TotalJobItems, CreatedBy.Email from AsyncApexJob where id =: bc.getJobId()];

  

   Messaging.singleEmailMessage mail = new Messaging.singleEmailMessage();

   mail.setToAddresses(new String[]{a.CreatedBy.Email});

   mail.setSubject('Batch Class Result');

   mail.setHtmlBody('The batch Apex job processed ' + '' + a.TotalJobItems + '' +

   ' batches with '+ '' + a.NumberOfErrors + '' + ' failures.');

   //sendEmail methods

   Messaging.sendEmail(new Messaging.singleEmailMessage[]{mail});

  

   /*** Scheduling in minutes or hours ***/

   /*//Create object for schedulable class

   SchedulableUsage su = new SchedulableUsage();

   //Preparing chron_exp

   Datetime sysTime = System.now();

   sysTime = sysTime.addminutes(6);

   String chron_exp = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' +

   sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();           

   System.schedule('Dep Update'+sysTime.getTime(),chron_exp, su);*/

  }

 }

read less
Comments
Dislike Bookmark

About UrbanPro

UrbanPro.com helps you to connect with the best Salesforce Certification Training in India. Post Your Requirement today and get connected.

Overview

Lessons 17

Total Shares  

+ Follow 3,830 Followers

Top Contributors

Connect with Expert Tutors & Institutes for Salesforce Certification

x

Ask a Question

Please enter your Question

Please select a Tag

X

Looking for Salesforce Certification Classes?

The best tutors for Salesforce Certification Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Salesforce Certification with the Best Tutors

The best Tutors for Salesforce Certification Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more