Standard Salesforce
  • Can we do validations on child object through parents object ?
    • No
  • If field gets update from workflow and we need to validate this, will validations work here ? If not then how ? If yes then how?
    • No. Because according to order of execution workflow comes after validation. So in this we can use Trigger to validate this, we cas use "AddError" method in After Trigger scenario
  • Can we update Child Of Child records from process builder. If yes then up-to how many level
    • Yes
  • What may be the reason if 'Assign using active assignment rule' checkbox is not visible while creating case?
    • Tick the Case Assignment Checkbox in Layout properties Case Page Layout >> Select Your Layout >> Layout Properties
  • Can we avoid duplicates using apex data loader which we do through import wizard?
    • No
  • Difference between Export and Export All?
    • Export: It will fetch the active record in Salesforce org
    • Export All: It will fetch all the data, including from recycle bin
  • How external id get used in Upsert?
    • Through external id it is decided whether the record needs to get update or create
  • Can validations rules applied in deletion of records?
    • No, validations rules only fire in insert and update
  • How to bypass validation rule if we upload through data loader
    • We can create field of checkbox datatype and hide in page layout. We can give in validation rule evaluation criteria for that checkbox. While uploading through data loader make the checkbox column to TRUE in csv file.
  • In how many ways we can make field required in salesforce?
    • While creation of field mark 'Required Field' to true
    • Through page layout
    • Check through Validation rule
    • Trigger
    • Lightning Layout 
  • How to restrict child records deletion in master-detail relationship using point and click functionality?
    • Yes, we can create roll up summary field 'Count' and it will calculate total count of child records. After that we can write validation rule on parent object which checks if previous value of total count is less than the new value. Like Priorvalue(count__c) < count__c
  • Can we convert master-detailed to lookup?
    • If there is no Roll-Up Summary field then we can convert
  • What happen to Junction object if we do Undelete
    • Master-detail relationship will be converted to lookup
  • Can standard picklist be dependent picklist.
    • No it will be only controlling picklist. Whereas custom picklist can controlling as well as
  • Difference between 15 digit and 18 digit ids ?
    • 15 digit: Is case sensitive and seen in user interface in URLs
    • 18 digit: Is case insensitive and return by SOQL, and APIs and also through data loader
  • Can standard object become child object
    • No it cannot become child object
  • Till how many days salesforce keep the deleted object and filed in recycle bin
    • 15 days
Security Settings in Salesforce

  • Can we define apex sharing reason for standard object.
    • No, apex sharing reason is only defined for custom object. For standard object we use 'Manual'
  • What will happen if profile related to user U1 above in role hierarchy doesn’t have CRUD permission for object say A. User U2 below in his role hierarchy have CRUD permission to object A. Will user U1 will be able to see or edit record if Grant Access Using Hierarchies is checked for object A in sharing settings?
    • No.If a user does not have read or edit access to an object via OWD, a profile or permission set, they will have no visibility on object regardless of their role and role hierarchy.
  • Can we restrict permission for users through Permission sets
    • No. permission sets always extends the permission
  • If a user does not have access to a specific record type, will they be able to see the records that have that record type?
    • Yes, because record type only control the UI visibility
  • If field is hidden and user try to search that value which is in that field. What happen?
    • Record with that field value will return in query
  • Difference between View All and Modify All?
    • View All: In this user can see all the records of that object regardless of the sharing and security settings.
    • Modify All: In this user can create, write all the records of that object regardless of the sharing and security settings.
  • Name some OWD options available
    • private
    • public read only
    • public read/write
    • public read/write/transfer (for Lead & Case)
    • public full access (for campaign)
    • controlled by parent (for order,contact,asset)
  • What is Matching Rule and Duplicate.
    • We can avoid from creating duplicate lead let say if company i.e Account is already exist. It will give the option in popup.
  • Can we bypass system admin in 'Duplicate'  & 'Matching Rule' 
    • No we cannot. We can achieve this by trigger


Lightning Flow
  • What if you create record through FLOW and miss required field ? Will you get error ?
    • Yes. We will get required field missing error on mail. 
Apex, Trigger, Batch & Future
  • Can we fetch parent field in Trigger & Classes ? For example Case.Account.Name 
    • No. We cannot fetch parent field from Trigger and Classes, we will get Null Pointer Exception. We have to query the parent field in some variable. In this case we will not get error while saving Trigger but get while execution
  • Can we show Error in Trigger with Apex.Message. What may be alternate way than Trigger AddError
    • No we cannot use Apex.Message in Trigger. We can use that only in apex. 
    • We can use AddError in Trigger. Trigger AddError can be used on Trigger context only
    • For Alternate we can use Exception method which extends Exception {}. The name of class must ends with name Exception
  • Can we call future method from Batch class ?
    • No, although we can write webservice in Batch then through that we can call Future.
  • How to stop trigger from being fire again and again if some condition get true by Process builder.
    • We can stop by checking the previous value from Trigger.oldMap.
  • Can we write Webservice class in Batch ?
    • Yes, We can write webservice class in batch class but we need to write interface Database.AllowsCallout
  • Can we write Webservice class in Schedule Class?
    • No, we cannot write webservice class in schedule class. We need to write class with @Future(Callout=true) then we can call that class in schedule execute method 
  • Can we write Webservice class in Trigger?
    • No, we cannot write webservice in Trigger as it will give CallOutException : Callout from Triggers are currently not supported. We need to write class with @Future(Callout=true) then we can call that class in Trigger
  • If you want to update same record in Trigger 'after update' and you are getting read only error, what you will do?
    • In loop create one instance for that object and assign the ID to that created instance Id. For eg. want to update same opportunity record in after update then code be like
    • For(Opportunity oppVar: OppList){Opportunity opty  = new Opportunity(); opty.Id = oppVar.ID;
  • Can we pass sObject list in future ?
  • Can we call do synchronous web service callouts from scheduled apex and Triggers (can we directly call handler in which webservice is written in Trigger or Scheduled)?
    • No, It is not supported. To be able to make callouts, make an asynchronous callout by placing the callout in a method annotated with @future(callout=true) and call this method from scheduled Apex and trigger.
  • Can we call scheduler from future method?
    • Yes
  • Can we call future method from Batch?
    • No, we cannot call future in batch
  • Is there any way so that we can call Future method from Batch?
    • We can call webservice class in Batch and in webservice class we can call @future method
  • Can we modify the scheduler classes or the classes refer by the scheduler if any job is active ?
    • No
  • Can we deploy the class which is in Apex Job?
    • No by default we cannot deploy those classes. 
    • We need to cancel the apex jobs
    • We need to Enable 'Allow deployment of component when apex job is active' but this may cause apex job fail
  • How to avoid recursive future method or trigger
  • Difference between database.insert and insert? How to get failed record
    • Database.inser: in this DML operation partial insert is allowed.
    • insert: in this either total insert will performed or it will be rolled back
    • For failed record we can check from Database.error i.e in Database.saveresult
  • Let say if we have 100 records and we have chunked this records in 5 batches and out of which there is error in 5 records what will happen if we use Database.insert and insert.?
    • Using Database.insert : All 100 records will be divided in 5 batch, each having 20 records. 4 batch will successfully run and in last batch only 15 records will process. i.e total 95 records will process.
    • Using insert: All 100 records will be divided in 5 batch, each having 20 records. 4 batch will successfully run and last batch will fail. So all 20 records will not processed. So total records process is 80
  • What is SOQL injection and how to defend that?
    • When we fetch the query through url and use "Like %somevar%" keyword in that query that will inject in database. To defend that we must use variable and use that variable in that query (String Var = "%somevar%") and then use "Like Var"
Integration

  • What are Access Token and Refresh Token