- What is audit trails in salesforce?
Ans: The audit trails shows you 20 most recent setup changes made to your organization. It lists the date of the change, who made it, and what the change was.
- What is the context variable of after undelete event trigger?
Ans: Trigger.new
- What is External id and primary id?
Ans: External id is the id which is unique for external Application where as Primary id is unique for internal organization.
- What is testSetup Method?
Ans: Use testSetup method (methods that are annotated with @testSetup ) to create test records once and then access them in every test methods in the test class. If a test class contains testSetup method, the testing framework executes the testSetup method first, before any test method in the test class.
Example:
Example:
@isTest private class CommonTestSetup { @testSetup static void setup() { // Create common test accounts List<Account> testAccts = new List<Account>(); for(Integer i=0;i<2;i++) { testAccts.add(new Account(Name = 'TestAcct'+i)); } insert testAccts; } @isTest static void testMethod1() { // Get the first test account by using a SOQL query Account acct = [SELECT Id FROM Account WHERE Name='TestAcct0' LIMIT 1]; // Modify first account acct.Phone = '555-1212'; // This update is local to this test method only. update acct; // Delete second account Account acct2 = [SELECT Id FROM Account WHERE Name='TestAcct1' LIMIT 1]; // This deletion is local to this test method only. delete acct2; // Perform some testing } @isTest static void testMethod2() { // The changes made by testMethod1() are rolled back and // are not visible to this test method. // Get the first account by using a SOQL query Account acct = [SELECT Phone FROM Account WHERE Name='TestAcct0' LIMIT 1]; // Verify that test account created by test setup method is unaltered. System.assertEquals(null, acct.Phone); // Get the second account by using a SOQL query Account acct2 = [SELECT Id FROM Account WHERE Name='TestAcct1' LIMIT 1]; // Verify test account created by test setup method is unaltered. System.assertNotEquals(null, acct2); // Perform some testing } }
- You have two sandboxes and both sandbox contain same classes and triggers even same test classes you written in both sandbox. you used only synchronous apex in your sandbox. At the time of deployment total code coverage is different then what would be reason for that?
Ans: If you use SeeAll data true in your test class.
- What is Force.com and Salesforce.com ? Mention the differences.
Ans: Force.com is a cloud computing platform where the developer builds multi-tenant applications. Salesforce.com is also a cloud computing platform, It contains only standard object. Salesforce.com is hoisted on Force.com.
- What are Force.com editions and Salesforce.com editions?
Ans: Force.com includes 5 editions:
- Free Edition.
- Enterprise with one App.
- Enterprise with multiple App.
- Unlimited with one App.
- Unlimited with multiple App.
Salesforce.com also include 5 editions:
- Contact Manager
- Group
- Professional
- Enterprise
- Unlimited
- How many object available in Professional, Enterprise and Unlimited Editions of Salesforce.com?
Ans: Professional: 50
Enterprise: 200
Unlimited: 2000
- What is an Assignment Rules?
Ans: It is a rule to specify how Leads/Cases are assigned to user or queues as they are created manually, captured from the web or imported via import wizard.
- How can I display one million records on visualforce page?
Ans: Visualforce is not meant to be display million(s) of records. Depending on your use case you could implement a pagination solution or a filter solution to filter vf to return few records at a time, but in general vf page doesn't handle that amount of data very well. Not only you can run into governor limits but also view state and cpu limit as well.
But you can do this for CSV or Pdf purpose then you should probably look at a more comprehensive, integrated solutions or packages or simply use data loader as an alternative.
If you want to show 10000 records on visualforce page in read only mode then you can use <apex:page controller="Custom Controller" readonly="true">
Comments
Post a Comment