Salesforce Administrator

Salesforce Administrator

Trending Questions and Lessons

Follow 2,557 Followers

Ask a Question

Feed

All

All

Lessons

Discussion

Answered on 03/12/2017 IT Courses/Salesforce Administrator IT Courses/Salesforce Consultant

Can anyone tell me about salesforce marketing cloud?

Padma

Salesforce Tutor

Salesforce Marketing Cloud is a provider of digital marketing automation and analytics software and services for email, mobile, social and online marketing. Salesforce Marketing Cloud is a customer relationship management (CRM) platform for marketers that allows them to create and manage marketing relationships... read more
Salesforce Marketing Cloud is a provider of digital marketing automation and analytics software and services for email, mobile, social and online marketing. Salesforce Marketing Cloud is a customer relationship management (CRM) platform for marketers that allows them to create and manage marketing relationships and campaigns with customers. read less
Answers 2 Comments
Dislike Bookmark

Lesson Posted on 05/08/2017 IT Courses/IT Certifications/Salesforce Certification IT Courses/Salesforce Administrator

Salesforce OWD

Kumar

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

Imagine you have two users. Both are in the same profile, which allows them to Create, Edit object XYZ. But these two users are in different parts of the role hierarchy.If User A Creates an XYZ, can user B edit it? The answer is only if the record is shared with him. If the Org Wide Default is Private... read more

Imagine you have two users. Both are in the same profile, which allows them to Create, Edit object XYZ. But these two users are in different parts of the role hierarchy.

If User A Creates an XYZ, can user B edit it? The answer is only if the record is shared with him. If the Org Wide Default is Private then he will not even be able to see the record that User A has created (unless it is explicitly shared with him). He can still create his own XYZ records and edit those. Likewise, if the Org Wide Default is public read only, User B could see it, but not edit it despite what his profile allows. He can edit only his own records or those shared with him.

Sharing also works up the role hierarchy. So User A's boss can see the XYZ record that User A created. If his profile allows, he can edit it, but his profile may not.

You can think of the profile as "What can a user do with the XYZ object" and the sharing as "Which particular XYZ records can he or she do it with"

If OWD is Public Read / Write but the profile does not have access to Read or to Edit then you cannot Read or Edit.

If OWD is Public Read / Write on object XYZ and profile has Read permission but not Edit, then the user with that profile can only Read XYZ (all of them).

If a user doesn't even have Read access to object XYZ then they cannot see any object XYZ regardless of the Org Wide Default.

Not correct : The owner who is higher on the role hierarchy has shared access to all the XYZ that his subordinates own. However, if the higher user has a profile which doesn't include read or edit then he cannot read or edit those records.

read less
Comments
Dislike Bookmark

Lesson Posted on 05/08/2017 IT Courses/Salesforce Administrator IT Courses/IT Certifications/Salesforce Certification IT Courses/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

Looking for Salesforce Administrator Training

Find best Salesforce Administrator Training in your locality on UrbanPro.

FIND NOW

Lesson Posted on 05/08/2017 IT Courses/Salesforce Administrator IT Courses/IT Certifications/Salesforce Certification IT Courses/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 IT Courses/Salesforce Administrator IT Courses/IT Certifications/Salesforce Certification IT Courses/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

Lesson Posted on 05/08/2017 IT Courses/Salesforce Administrator IT Courses/IT Certifications/Salesforce Certification IT Courses/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

Looking for Salesforce Administrator Training

Find best Salesforce Administrator Training in your locality on UrbanPro.

FIND NOW

Lesson Posted on 05/08/2017 IT Courses/IT Certifications/Salesforce Certification IT Courses/Salesforce Developer IT Courses/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 IT Courses/IT Certifications/Salesforce Certification IT Courses/Salesforce Administrator IT Courses/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

Lesson Posted on 05/08/2017 IT Courses/Salesforce Developer IT Courses/IT Certifications/Salesforce Certification IT Courses/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

Looking for Salesforce Administrator Training

Find best Salesforce Administrator Training in your locality on UrbanPro.

FIND NOW

Lesson Posted on 05/08/2017 IT Courses/Salesforce Developer IT Courses/IT Certifications/Salesforce Certification IT Courses/Salesforce Administrator

How To Schedule Batch Apex In Minutes/Hours?

Kumar

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

To schedule the batch class in minutes/hours, in the finish method we should use System.schedule method which will take 3 parameters Job Name, Chrone Expression and schedulable class instance name respectively. /*** Scheduling in minutes or hours ***/ //Create object for schedulable class SchedulableUsage... read more

To schedule the batch class in minutes/hours, in the finish method we should use System.schedule method which will take 3 parameters Job Name, Chrone Expression and schedulable class instance name respectively.

   /*** 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 Administrator Training in India. Post Your Requirement today and get connected.

Overview

Lessons 20

Total Shares  

Top Contributors

Connect with Expert Tutors & Institutes for Salesforce Administrator

x

Ask a Question

Please enter your Question

Please select a Tag

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 25 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 6.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