Frequently asked Salesforce Interview questions with answers - Part 2

1) Can we Undelete the records after 20 days of deletion?
No. We can only Undelete the records within 15 days of deletion. Beyond 15 days, we need to contact Salesforce to get the records.

2) Explain different types of relationship in Salesforce.
There are three important relationships available in Salesforce.

Lookup Relationship:
  1. It is a Parent - Child relationship where Parent is not a required field in Child object.
  2. We can have upto 25 lookup relationships in single object.
  3. Child record will not be deleted if Parent record is deleted.
  4. No impact on Security and Access.
Master-Detail Relationship:
  1. It is a Parent - Child relationship where Parent is required field in Child object.
  2. We can have upto 2 Master-Detail relationships in single object.
  3. Rollup Summary field can only be created on Master in Master-Detail relationship.
  4. Child record will be deleted, if Parent record is deleted.
  5. Access to Master record gives access to Detail records.
Many-to-Many Relationship : 
  1. Many-to-Many relationship allows each record of one object to link with multiple records of other object and vice versa.
  2. This can be achieved by using Junction object.
  3. Junction object is a Custom object with two Master-Detail Relationship.
3) What is a relationship between Accounts and Contacts?
They show lookup relationship because Account field is not required on Contact page but they also show Master-Detail relationship because contact gets deleted when Account is deleted.

However, they have lookup relationship and it has a property called CascadeDelete set to True and this is why Contacts gets deleted when Account is deleted

4) What is workflow?
Workflows help in automating four actions based on the Evaluation criteria set by user.
Evaluation Criteria:
  1. When Record is Created.
  2. When Record is Created and Edited.
  3. When record is Created and Edited to meet rule criteria.
Actions:
  1. Create new Task.
  2. Send Email alert.
  3. Field Update.
  4. Outbound Message.
5) How to populate account field in contacts without coding?
This can be achieved by using cross object formula field in Contacts.

6) How to get count of Child records in Parent object having lookup relationship.
This can be done using Trigger.

7) What is Custom setting and explain its types?
Custom Setting is similar to Custom Objects which lets you customize org data. It saves data in Cache memory, which makes is effective as there wont be any limitation of retrieving data unlike custom object. There are two types of Custom Settings:

List Custom Setting: This custom setting provides data which will remain same for entire organization. Every user will view same set of data.

Hierachy Custom Setting: This custom setting provides data which will differ based on the users access. It will show/restrict data based on users permission.

8) What is Joined Reports?
Joined reports helps in generating a report using multiple report types. Report types are added as blocks and we can add upto 5 record types in a single Joined reports.

9) What is Field Bucket?
Field Bucket helps in categorizing records in reports without adding any formula or extra custom field. 

10) What is Dynamic Dashboard?
Dynamic dashboard are used to display information tailored to a specific user, while normal dashboard shows data only from single users perspective. Dynamic dashboards should be used when each user has to see "User-Specific data".

11) What are components of dashboard?
  1. Chart
  2. Gauge
  3. Metric
  4. Table
  5. Visualforce Pages
12) What are Custom Metadata types.
Custom Metadata types are similar to custom setting with many advance features. One of the best feature of custom metadata is that both "Data" and "Metadata" deployed together unlike custom setting where only Metadata is deployed first and then data has to be moved manually.

13) What is __r?
__r represents a custom relationship between two objects. we use it when we query a custom relationship from Parent to child or vice versa.
For example:

Child__c is a child object and Parent__c is a Parent object.

Child to Parent relationship query:
Select ID, Parent__c, Parent__r.Name from Child__c;
Parent to Child relationship query:
Select ID, Name, (Select ID, Name from Child__c) from Parent__c;

14) What will happen if we Undelete the deleted Junction object?
If we Undelete the deleted Junction object, Master-Detail relationship will convert to Lookup Relationship.

15) What is Batch Apex? How to know status of the Batch Job?
Batch Apex is an asynchronous process which is used to process millions of records. It uses three methods, Start, Execute and Finish.

Status can be found using below query:

AsyncApexJob a = [Select ID, Status, NumberOfErrors, TotalJobItems, CreatedBy.Email from AsyncApexJob where ID =:BC.getJobID()];

16) What is Wrapper Class?
Wrapper Class is a container Class whose instances are the collection of other objects. It is a custom object defined by developer where he defines the property of the class.

17) What will happen if we perform "Update" on "After Update" trigger?
It will result in recursive trigger.

18) What is constructor?
A constructor is a special method that is used to initialize a newly created object and is called just after memory is allocated for the object.

19) Approach to view all records related to user from account whenever visualpage loads
We will use custom controller with constructor having a query to display data based on user.

20) Explain different types of controller?
There are three types of controller.

Standard Controller: They are the default controllers provided by Force.com. These standard controllers will have same logic and functionality which are used in visaulforce pages. Coding is not required.
<apex:page standardcontroller = "contact">

Custom Controller: These are used when developer need a functionality which cannot be fulfilled by Standard controller. These require coding.
<apex:page controller = "testApexCode">

Extension controller: In order to use both standard and custom controllers functionality, we use extension controller.
<apex:page standardcontroller = "contact" extensions = "testApexCode">

21) How to make Apex REST call using custom button?
Using below command in custom button:
sforce.apex.execute("classname", "methodname",{parameter passed to method}

22) How to load attachments using Dataloader?
Create an attachments.csv file (the name of the file is unimportant) with the following column headers:

ParentId - ID of the record to which the attachment should be associated 
Name - Name of the attachment 
ContentType - Format of the extension (e.g. .xls, .pdf, etc) 
OwnerID - ID for the owner of the attachment
Body - File path to the Attachment on the local machine (C:\documents and 
settings\schun\desktop\attachments\file.xls)

Log in to the Data Loader. Select the "Insert" command. In the 'Select Sforce Object' step, select the 'Show all Sforce Objects' checkbox and then select "Attachments". Choose the attachments.csv file. In the mapping step, map the following fields:

Parent ID 
Name 
Owner ID 
Body - Make sure to map the Body column which you created previously with the file extension. 

This is how you designate the file and location of the attachments to be inserted. 
Click "OK" to proceed with the insert. It may take a few minutes but the attachments should be successfully uploaded to your salesforce org.

23) What is Mixed DML error?
DML operations on certain sObjects, sometimes referred to as setup objects, can’t be mixed with DML on other sObjects in the same transaction. This restriction exists because some sObjects affect the user’s access to records in the org. You must insert or update these types of sObjects in a different transaction to prevent operations from happening with incorrect access-level permissions. For example, you can’t update an account and a user role in a single transaction. However, deleting a DML operation has no restrictions.

24) How to avoid Mixed DML error in Test methods?
Use @future to Bypass the Mixed DML Error in a Test Method.



Cheers !
Facebook - anupkabravlogs
Instagram - anupkabravlogs
YouTube   - Anup Kabra Vlogs

Comments

  1. Hi There,

    This is indeed great! But I think perhaps you are generally referring Frequently asked Salesforce Interview questions with answers - Part 2 which is getting unsustainable.

    I have an apex datatable returning some User fields from a list in my apex class. I would like to include a column "This Month's Sales" which would return the total $ of opps closed won this month. I can run the SOQL in my class but I'm not sure how to get the correct result per user into the table, i.e. how to put it into the correct row and column in my table. Can I attach this $amount to each user without creating a custom field?

    I am so grateful for your blog. Really looking forward to read more.

    Kind Regards,
    Preethi.

    ReplyDelete
    Replies
    1. Do a sex loop, and iterate the records

      Delete
  2. Nice & Informative Blog ! Do you need instant help to fix your QuickBooks issues? If yes, we are here to help you. Dial our QuickBooks Proadvisor Support Phone Number +1-800-986-4607 now.

    View on Map: https://tinyurl.com/yxvhsebg

    ReplyDelete
  3. Nice Blog ! We provide our services 24*7.Whenever you face any technical glitches, you can without any delay dial our QuickBooks Customer Service Number 1-800-986-4607.

    ReplyDelete
  4. Are you getting frustrated by any QuickBooks issue? If so, dial our QuickBooks Proadvisor Support Phone Number 855-907-0406 and resolve issues quickly.We have a panel of experts with various qualities.
    View on Map https://tinyurl.com/s8d2kd2

    ReplyDelete
  5. Nice and very informative blog click here for Quickbooks Payroll Support Phone Number and for more detail dial on 844-908-0801

    ReplyDelete
  6. Very well explained and informative blog click here for
    Quickbooks for Mac Support Phone Number for more detail dial on 844-908-0801

    ReplyDelete
  7. Hi! Superb blog. Thanks for writing for such informative content. If you want a robust accounting software for managing your business accounts, then go for QuickBooks. To get support for the software, dial QuickBooks Phone Number 1-833-401-0204 and experience world-class technical assistance at your door. Read more: https://tinyurl.com/y44kbf5u or visit: https://www.techiesupportnumber.com/quickbooks-phone-number/

    ReplyDelete
  8. Dealing with QuickBooks Problems is no more a hassle now! Dial QuickBooks Support Phone Number 855-907-0406 when you experience the issue.
    View on Map: QuickBooks Customer Service

    ReplyDelete
  9. Reach us via QuickBooks Desktop Support Phone Number +1(833)780-0086 to get rid of the QuickBooks issues. The professional team is always there to assist you with the finest solutions. For More Visit: http://www.santrasolutions.com/quickbooks-desktop-support/

    ReplyDelete
  10. Nice Blog, Are you finding it hard to- deal with QuickBooks issues? Dial our QuickBooks Payroll Support Phone Number 855-907-0406 now for instant solutions.
    View on Map:QuickBooks Support Phone Number.

    ReplyDelete
  11. QuickBooks is a popular accounting application that allows its users to organize financial information, keep track of cash-flows, and generate reports using one single interface. However, being a software, QuickBooks sometimes faces the brunt of user’s frustration due to unwanted technical snags or errors. To fix these issues, you must consult a QuickBooks Support department in Florida. To help you out, the team at QuickBooks Support Phone Number Florida 1 855-907-0605 will guide in repairing all the issues from their roots.

    ReplyDelete
  12. Nice Blog ! We are the one-stop solution to all your issues & query, if facing issues in QuickBooks. Get valuable aid with QuickBooks Customer Service Phone Number 855-907-0406.

    ReplyDelete
  13. Facing errors? Are you looking for help? Contact QuickBooks tech support phone number now! We are specialized in dealing with the services and handling problems related to QuickBooks. Enjoy our services by dialling our QuickBooks Support Phone Number 855-907-0406 Solutions will be delivered to you within seconds.

    ReplyDelete
  14. Well explained and knowledgeable blog click here for
    Quickbooks Customer Service Phone Number for more detail dial on our Quickbooks Customer Service Number 855-907-0406.

    ReplyDelete
  15. QuickBooks is an advanced accounting application, still in many instances occurs with technical faults. For resolution of such issues, dial QuickBooks Customer Support Phone Number 1-833-780-0086. Here, you will connect with Highly skilled professionals who provide Customer oriented results. https://g.page/quickbooks-support-pennsylvania

    ReplyDelete
  16. Nice Blog !
    Confronting Quicken Error cc 502? Get instant aid to resolve the error. Dial us at 1-855-9O7-O4O6 to fix the error code issue. Basically, Quicken Error CC-502 is a common error that occurs while updating the Bank account into Quicken.

    ReplyDelete
  17. QuickBooks also has some flaws which can be resolved after Dialling Phone Number For QuickBooks Support 1-833-780-0086. For More Visit: https://g.page/quickbookssupporttexas

    ReplyDelete
  18. Looking for Fingerprinting services for PCC? Feel Free to contact us at 9868106032 & fix your appointment with us. Our fingerprinting agency is equipped with modern gears that helps to give precise results in a hassle-free manner. For More Visit: https://www.indiafingerprinting.com/pcc-usa-fbi-delhi.html

    ReplyDelete
  19. KUBET được cộng đồng cá cược đánh giá là nhà cái số 1 Châu Á trong năm 2019 hiện tại. Với nhiều trò chơi hấp dẫn, tỷ lệ cược cực cao, trải nghiệm mượt mà mang tới cơ hội kiếm tiền cho anh em. KUBET.IO là trang web cung cấp link đăng ký, đăng nhập KU BET - KU CASINO chính thức, hướng dẫn hội viên tham gia các trò cá cược trên nhà cái, cũng như cách nạp tiền, rút tiền.



    Từ khóa: #ku, #kubet, #kucasino, #kubetio, #ku777, #ku888, #ku999, #casino, #thienhabet, #kubetcasino



    Mạng xã hội KUBET chính thức:


    https://infogram.com/dang-ky-kubet-cach-tao-lap-tai-khoan-ku-bet-don-gian-1h8j4xglr0od6mv

    https://trello.com/kubet

    https://block-x.co/dang-ky-kubet/

    https://www.youtube.com/channel/UCyPQbqZIZKV60Q7njSmKe3A


    https://www.surveymonkey.com/r/S5X7VBD


    Website: Kubet.io

    ReplyDelete
  20. Taxitaithanhhung.vn - công ty cung cấp giải pháp chuyển nhà trọn gói tại Hà Nội. Với mong muốn mang đến cho quý khách hàng dịch vụ vận chuyển nhà tại Hà Nội tốt nhất. Đội ngũ nhân viên chuyển nhà trọn gói Thành Hưng chuyên nghiệp, hệ thống xe tải với số lượng lớn, chúng tôi tự tin cam kết mang đến cho quý khách hàng 1 dịch vụ tốt nhất!

    Từ khóa chuyển nhà Hà Nội - công ty cung cấp dịch vụ chuyển nhà Thành Hưng:

    #chuyennhahanoi #chuyennhataihanoi #dichvuchuyennhahanoi #dichvuchuyennhataihanoi #dichvuchuyennhathanhhung #chuyennhatrongoithanhhung #chuyennhatrongoihanoi #chuyennhatrongoitaihanoi #donnhathanhhung #donnhatrongoihanoi #chuyennhagiarehanoi #dichvuchuyennhagiarehanoi

    https://issuu.com/hongnhi5315

    https://ello.co/chuyennhatrongoithanhhung

    https://www.flickr.com/photos/186351652@N04/

    https://trello.com/chuyennhatrongoithanhhung

    https://gab.com/chuyennhathanhhung



    ReplyDelete
  21. Nice Blog !
    Facing issues in QuickBooks For Mac Support Phone Number 1-855-6OO-4O6O? Don’t worry! Get help from our executives and just sit back relaxed. Users can avail our services round the clock.We have a team of experts to troubleshoot all your quickbooks issues. Solutions we deliver 100% reliable and you will get them just in seconds.

    ReplyDelete
  22. Get in touch with our highly skillful QB experts by contacting our team members at QuickBooks Support Number 1-833-325-0220. Now, you would not have to face pop-up error-codes any more with the availability of our QuickBooks certified professionals who are all well-trained with their expertise about QuickBooks & its day-to-day issues. For More Visit: https://g.page/qb-support-number-hawaii

    ReplyDelete
  23. If you are facing any sort of problem in QuickBooks. Reach out for help by dialling QuickBooks Customer Support Phone Number 1-833-325-0220. Here, users can acquire prominent aid for every kind of issue.

    ReplyDelete
  24. This is actually nice post ...It gives extremely valuable information...Thanx for sharing...If you looking best Quickbooks Errors number We give Quickbooks Errors number and Quickbooks Errors client service to finish help for explaining all quarries identified with QuickBooks Software.

    Read Here:- quickbooks support

    ReplyDelete

  25. Very informative!
    Facing QuickBooks error code 80070057? if you hang up with QuickBooks error code 80070057 Get live support 24*7 from QuickBooks expert on tool-free Number.
    Click here to know How to fix QuickBooks error code 80070057
    Dial for any tech support: 1-844-908-0801

    ReplyDelete
  26. Very informative!
    Facing QuickBooks error code 1603? if you hang up with QuickBooks error code 1603 Get live support 24*7 from QuickBooks expert on tool-free Number.
    Click here to know How to fix QuickBooks error code 1603
    Dial for any tech support: 1-844-908-0801

    ReplyDelete
  27. Worried about QuickBooks Support ? Contact to Our QuickBooks Customer Service Number for free and get instant solution regarding QuickBooks error.
    Dial QuickBooks Customer Service Number 1-844-908-0801

    ReplyDelete
  28. Hey! Wonderful post. In case you are having any difficulty in managing business accounts, then try using QuickBooks software. For any other help regarding QuickBooks, dial Quickbooks Customer Service Number in Georgia +1-844-442-1522 and get the best methods for QuickBooks issues.

    Visit here : https://tinyurl.com/y36oztxw

    ReplyDelete
  29. Hey! Nice post.
    It is one of the best things that I have read on the internet today. To fix QuickBooks issues, dial, QuickBooks Customer Service Number in Arizona +1-844-442-1522 and get instant technical assistance from experts.

    Visit here : https://tinyurl.com/y6b7s78d

    ReplyDelete
  30. Hey! I hope your working with QuickBooks is going great. If not, then dial QuickBooks Customer Service Number in Oregon +1-844-442-1522 and get the best technical assistance from accredited professionals.


    Visit here : https://tinyurl.com/yynl9svv

    ReplyDelete
  31. Hey! Amazing write-up. If you are using QuickBooks software, then you must be aware of the fact it is not resilient to errors. To fix QuickBooks issues, dial QuickBooks Phone Number New Jersey +1-844-442-1522 and get help from experts. Our service at QuickBooks Customer Service Phone Number in New Jersey +1-844-442-1522 is open 24/7.

    ReplyDelete
  32. Hey! I hope you are doing well. In case you are looking for the best technical service in Florida , then look no further than QuickBooks Phone Number in Florida +1-844-442-1522.

    Visit here : https://tinyurl.com/y2fhzqfj

    ReplyDelete
  33. Hey! Outstanding work. For quick resolution of QuickBooks problems, dial QuickBooks Customer Service Phone Number in Atlanta +1-844-442-1522 and get instant assistance from our end.

    ReplyDelete

  34. Thietkenhadepmoi.vn - công ty thiết kế nhà đẹp uy tín. Thiết kế nhà - thiết kế nhà đẹp mới - thiết kế thi công nhà đẹp - thiết kế xây dựng nhà đẹp - mẫu nhà đẹp mới. Tổng hợp các mẫu nhà mái thái đẹp - mẫu nhà phố đẹp - mẫu biệt thự đẹp sang trọng.
    Liên hệ ngay với công ty Thiết kế nhà đẹp mới để được tư vấn và báo giá miễn phí!

    Từ khóa thiết kế nhà đẹp mới :
    #thietkenhadepmoi #thietkenhadepmoivn #thietkennha #thietkennhadep #maunhadepmoi #thietkennhadepmoi #thietkennhauytin #maubietthudep #maunhamaithaidep #mauthietkenhadep #thietkexaydungnhadep #maunhaphodep #congtythietkenhadep #thietkethicongnhadep #thietkexaydungnhadep #maunhadepmoi #maunhamoi #xaydungnhadep #congtynhadep

    https://visual.ly/users/thietkenhadepmoivn/portfolio
    https://www.zoimas.com/profile/thietkenhadepmoivn
    https://www.woddal.com/thietkenhadepmoivn
    https://pawoo.net/@thietkenhadepmoivn
    https://player.me/thiekenhadepmoivn/about

    Website: Thietkenhadepmoi.vn

    ReplyDelete
  35. Nice Blog!
    QuickBooks Support provide you 24*7 live support for any issues realted with QuickBooks.
    Dial QuickBooks Customer Service Phone Number Georgia +1-855-509-0902.
    Do visit for More info: https://g.page/r/CWkxwbMOCTCSEBA






    Nice Blog!
    QuickBooks Support provide you 24*7 live support for any issues realted with QuickBooks.
    Dial QuickBooks Customer Service Phone Number Tenesee +1-855-509-0902.
    Do visit for More info: https://g.page/r/CT-idbVzRgwAEBA


    Nice Blog!
    QuickBooks Support provide you 24*7 live support for any issues realted with QuickBooks.
    Dial QuickBooks Customer Service Phone Number Washington +1-855-509-0902.
    Do visit for More info: https://g.page/r/CbAExcGC3sc_EBA


    Nice Blog!
    QuickBooks Support provide you 24*7 live support for any issues realted with QuickBooks.
    Dial QuickBooks Customer Service Phone Number Oregon +1-877-751-0742.
    Do visit for More info: https://g.page/r/CZc5UTAzTSuiEBA


    Nice Blog!
    QuickBooks Support provide you 24*7 live support for any issues realted with QuickBooks.
    Dial QuickBooks Customer Service Phone Number Nevada +1-855-509-0902.
    Do visit for More info: https://g.page/r/CREUsrmqIereEBA








    ReplyDelete
  36. Amid uncertainty over coronavirus lockdown, we at QuickBooks Customer Service Phone Number 1-855-662-2O4O still provide 24/7 reliable assistance. All the queries related to QuickBooks will be answered by our QuickBooks experts.

    https://tinyurl.com/yy33sxqb

    ReplyDelete
  37. Nice Blog !
    While using QuickBooks Payroll is if the user has entered an Incorrect pin in the Payroll, they may come across QuickBooks Payroll Error 30159
    Dial QuickBooks Customer Service Phone Number Arizona 1-855-550-7546

    ReplyDelete
  38. Nice Post !
    QuickBooks Error 404. It is a common error but a complex one. The error is reported by many users. If it occurs to you.
    Dial Quickooks Support Phone NUmber illinois +1-855-756-1077.

    ReplyDelete
  39. Nice Blog!
    Know More About QuickBooks error.if suffer any issues with QuickBooks just get in touch with expert on tool-free Number.
    Dial QuickBooks Customer Service Washington +1-855-756-1077
    Dial for any tech support: +1-855-756-1077

    ReplyDelete
  40. hey... Great work . I feel nice while i reading blog .You are doing well. Keep it up. We will also provide dial QuickBooks Customer Service to reach us call to +1 877-751-0742 for instant help.

    ReplyDelete
  41. Nice Blog !
    COVID 19 pandemic has triggered conditions of panic and stress among people. In these stressful times, our team at QuickBooks Customer Service Number 1-855-405-6677 makes sure to assist you with needful technical service for QuickBooks at an affordable rate. 

    ReplyDelete
  42. Hello! I've been following your weblog for some time now and finally got the courage to go ahead and give you a shout out from Porter Texas! Just wanted to mention keep up the excellent job!

    ReplyDelete
  43. Nice Blog !

    Are you looking for help on how to fix QuickBooks Error 15101? Our team consists of experienced and qualified professionals who provide immediate help for QuickBooks problems.

    ReplyDelete
  44. Nice content and great blog, if you face any technical issue in QuickBooks, please visit:Quickbooks Customer Service

    ReplyDelete
  45. Many thanks for your kind invitation. I’ll join you.
    Would you like to play cards?
    Come to the party with me, please.
    See you soon...

    แจกเครดิตฟรี ฝากถอนง่าย

    คาสิโน

    คาสิโน

    เล่นบาคาร่า

    ReplyDelete
  46. Big thank you for sharing this valuable post. I really appreciate your information which you shared with us. If anyone wants to create his/her career in Software Testing. Get a free demo call on 9311002620 or visit https://www.htsindia.com/software-testing-training-courses

    ReplyDelete
  47. Nice article,Thank you for sharing valuable info....Keep sharing...Best MicroNutrients Company in India

    ReplyDelete
  48. Fabulous Post....!!!! Keep Sharing.

    ReplyDelete

  49. What Causes QuickBooks error 6000 77 Company file should be placed on the local drive which is located on an external storage device.We have a few easy troubleshooting methods to fix this error mentioned in this blog post. Go through it and take help from our QuickBooks expert’s team to fix the error completely. Call us at +1-855-738-0359 TODAY!

    ReplyDelete

Post a Comment

Popular Posts