Salesforce

An effort to bring a revolution in Salesforce.

Thursday 30 July 2015

How to convert from 18 Digit Salesforce ID to 15 Digit ID Using Apex Class

How to convert from 18 Digit Salesforce ID to 15 Digit ID Using Apex Class ?

 

String Id= ’00111000009lpABAAY’;
String  Id15Digit = Id15Digit .substring(0, 15);
system.debug(’15 Digit ID”+ Id15Digit );

 Change Code As par your need.

Wednesday 29 July 2015

How to Insert Account Using Rest API In Salesforce ?


 
@RestResource(urlMapping='/*')
global class InsertAccount
{
    @Httppost
    global static String InsertAccount()
    {  

        // Insert Account Using Post Method

        Account  acc = new Account();
        String jsonStr = null;
        if (null != RestContext.request.requestBody){
        
        jsonStr = RestContext.request.requestBody.toString();
        Map<String, object> m = (Map<String, object>)JSON.deserializeUntyped(jsonStr );
        system.debug('******'+m );
        acc.Name=(String)m.get('AccountName');
        insert acc;
       }
        return 'Account Inserted';
    }
    
    
     @HttpGet
    global static String InsertAccountRest()
    {   

               // Insert Account Using Get Method

        Account  acc1 = new Account();
        acc1.Name=RestContext.request.params.get('AccountName');
        insert acc1;
    
        return 'Account Inserted';
    }
}
 

> For Executing the REST API Please do following steps



  • Select your Environment and API Version then checked the terms of service
  • Then click on Login With Salesforce
 

 Using GetMethod

 
 
  

Using Post Method

 
,

How to use REST API in ? !! Salesforce !!

How to use REST API in   Salesforce ?

This is the Class For REST API

APEX Class 

@RestResource(urlMapping=’/*’)
global with sharing class LocationRESTAPI {
global class Location_Result {
DOuble latitude{get;set;}
Double longitude{get;set;}
string userLocation{get;set;}
Boolean result{get;set;}
}
@RestResource(urlMapping=’/setLocation’)
@httppost
global static void setLocationDetails(Decimal latitude, Decimal longitude,String conId) {
Boolean result = false;
RestRequest request = RestContext.request;
RestResponse response = RestContext.response;
system.debug(‘==latitude==>’+latitude‘longitude====>’+longitude);
try{
Contact con = new Contact();
con.Location__latitude__s = latitude;
con.Location__Longitude__s = longitude;
con.lastname = ‘test';
insert con;
result = true;
}catch(Exception e) {
result = false;
}
response.responseBody = Blob.valueOf(‘{ “result”:’+ result +’ }’);
return;
}
global static String getUserInfo(){
return UserInfo.getProfileId();
}
@RestResource(urlMapping=’/getLocation’)
@HttpGet
global static Location_Result getLocation(){
RestRequest request = RestContext.request;
RestResponse response = RestContext.response;
/*  Location_Result location_Result = new Location_Result();
String contactId = request.params.get(‘ConId’);
system.debug(‘==contactId ==>’+contactId );
Contact con = new Contact(); */
String uId = userinfo.getUserId();
system.debug(‘===uId====>’+uId
User u = new User();
u = [Select Id,ContactId from User where id =: uid];
Location_Result location_Result = new Location_Result();
Contact con = new Contact();
try {
con = [SELECT Name,Title,Account.Name,OwnerId,Location__Longitude__s,Location__latitude__s FROM Contact WHERE id =: u.ContactId]; // Name =: contactName OR Account.Name =: companyName OR Title =: jobTitle  limit 1];
location_Result.latitude = con.Location__latitude__s;
location_Result.longitude = con.Location__Longitude__s;
location_Result.result = true;
}catch(Exception e) {
location_Result.result = false;
}
return location_Result;
}
}
> For Executing the REST API Please do following steps
  • Select your Environment and API Version then checked the terms of service
  • Then click on Login With Salesforce

 

  • After the logged into Workbench you can Choose HTTP Method to perform on the REST API service, (Here I Choose GET Method and Fetch Longitude and Latitude From Contact Record).
  • And also you can see the Raw Response of that particular record by clicking on SHOW RAW RESPONCE ( Here I already select that Link so it’s show me the HIDE RAW RESPONSE )


,

Sunday 26 July 2015

Best practice to avoid governor limits while writing apex?

 Please check below post . I hope that will help you
https://developer.salesforce.com/page/Apex_Code_Best_Practices



1) One Trigger Per Object
A single Apex Trigger is all you need for one particular object. If you develop multiple Triggers for a single object, you have no way of controlling the order of execution if those Triggers can run in the same contexts

2) Logic-less Triggers
If you write methods in your Triggers, those can’t be exposed for test purposes. You also can’t expose logic to be re-used anywhere else in your org.

3) Context-Specific Handler Methods
Create context-specific handler methods in Trigger handlers


4) Bulkify your Code
Bulkifying Apex code refers to the concept of making sure the code properly handles more than one record at a time.

5) Avoid SOQL Queries or DML statements inside FOR Loops
An individual Apex request gets a maximum of 100 SOQL queries before exceeding that governor limit. So if this trigger is invoked by a batch of more than 100 Account records, the governor limit will throw a runtime exception

6) Using Collections, Streamlining Queries, and Efficient For Loops
It is important to use Apex Collections to efficiently query data and store the data in memory. A combination of using collections and streamlining SOQL queries can substantially help writing efficient Apex code and avoid governor limits

7) Querying Large Data Sets
The total number of records that can be returned by SOQL queries in a request is 50,000. If returning a large set of queries causes you to exceed your heap limit, then a SOQL query for loop must be used instead. It can process multiple batches of records through the use of internal calls to query and queryMore

8) Use @future Appropriately
It is critical to write your Apex code to efficiently handle bulk or many records at a time. This is also true for asynchronous Apex methods (those annotated with the @future keyword). The differences between synchronous and asynchronous Apex can be found

9) Avoid Hardcoding IDs
When deploying Apex code between sandbox and production environments, or installing Force.com AppExchange packages, it is essential to avoid hardcoding IDs in the Apex code. By doing so, if the record IDs change between environments, the logic can dynamically identify the proper data to operate against and not fail

Saturday 25 July 2015

How to create Contact in the Account As a Related list

 

This post is for insert ACCOUNT as well as its CONTACT.

 

 e.g. see below screeshot :



Create one Visualforce Page.
Create one Class related to that visualforce Page.


Code of Visualforce Page :

<apex:page Controller="AccountDetail">

<apex:form >
    <apex:pageblock title="Account Detail with contact">
        <apex:pageblockButtons location="bottom">
            <apex:commandButton value="Save" action="{!Save}"/>
        </apex:pageblockButtons>
        <apex:outputPanel >
            <apex:pageblockSection title="Account Detail">
                <apex:inputField value="{!account.Name}" />
                <apex:inputField value="{!account.AccountNumber}"/>
                <apex:inputField value="{!account.date__c}"/>
             </apex:pageblockSection>
        </apex:outputPanel>  
        <apex:outputPanel >
              <apex:pageblockSection title="Contact Detail">
                <apex:inputField value="{!contact.FirstName}" />
                <apex:inputField value="{!contact.LastName}"/>
             </apex:pageblockSection>
        </apex:outputPanel>
    </apex:pageblock>
</apex:form>

</apex:page>

Code of Class related to above visualforce Page :

Public class AccountDetail{

    public Account account{get;set;}
    public Contact contact{get;set;}
 
    public AccountDetail(){
       account = new Account();
       contact = new Contact();
    }

 
    public void Save(){
    insert account;
    contact.AccountId = account.Id;
    insert contact;
    update account;
    }

}

 

 

,

Friday 24 July 2015

How to create Wrapper Class in Salesforce.

Wrapper Class in Salesforce.

http://salesforce-parth.blogspot.in/

 

 Apex Class:

Public class OrderController{
    Public List<Order__c> orderList{get;set;}
    Public WrapperClass singleConditionWrapper{get;set;}
    Public List<WrapperClass> WrapperList{get;set;}

    Public List<System__c> systemList{get;set;}
   
    Public OrderController(){
        WrapperList= new List<WrapperClass>();
        orderList = new List<Order__c>();
        orderList = [select Id,Name,Part_No__c,Opportunity__r.Show_On_Sites_Page__c ,Opportunity__r.Shipping_Company__c,Opportunity__r.Shipping_City__c, Opportunity__r.Shipping_Email__c, Opportunity__r.Shipping_Phone__c, Opportunity__r.Shipping_State__c, Opportunity__r.Shipping_Street__c, Opportunity__r.Shipping_Zip__c  from Order__c where Id =: orderId];
        if(orderList.size() > 0){
            orderName = orderList.get(0).Name;
            isShow = orderList.get(0).Opportunity__r.Show_On_Sites_Page__c;
        }
       
        systemList = new List<System__c>();
        systemList = [Select Id,Name,Serial_Number__c,Asset_Tag__c from system__c where Opportunity__c =: oppId];     
        if(systemList.size() > 0){
            for(Integer i=0; i < systemList.size(); i++){
                singleConditionWrapper = new WrapperClass(systemList.get(i).Name,systemList.get(i).Serial_Number__c,systemList.get(i).Asset_Tag__c);
                WrapperList.add(singleConditionWrapper); 

            }
        }
    } 
    Public class WrapperClass{
        Public String systemName{get;set;}
        Public String serialNumber{get;set;}
        Public String assetTag {get;set;}
   
        public WrapperClass(String systemName,String serialNumber,String assetTag){
            this.systemName=systemName;
            this.serialNumber=serialNumber;
            this.assetTag =assetTag;
        }
    }
}

Visual Force Page:

<apex:page Controller="OrderController" sidebar="false" showHeader="False">
         <apex:pageBlock rendered="{!IsShow != false}"> 
           <apex:repeat value="{!WrapperList}" var="Wap">
             <apex:pageBlockSection id="SectionColor1" title="System Name : {!Wap.systemName} | Serial Number : {!Wap.serialNumber} | Asset Tag : {!Wap.assetTag}  ">
                 
                  <apex:pageBlockTable value="{!orderList}" var="ol">
                     
                      <apex:column headerValue="Part" value="{!ol.Part_No__c}"/>
                      <apex:column headerValue="Shipping Details" value="{!ol.Opportunity__r.Shipping_Company__c} {!ol.Opportunity__r.Shipping_Street__c} {!ol.Opportunity__r.Shipping_City__c} {!ol.Opportunity__r.Shipping_State__c} {!ol.Opportunity__r.Shipping_Zip__c  } {!ol.Opportunity__r.Shipping_Phone__c} {!ol.Opportunity__r.Shipping_Email__c}" />
                      <apex:column headerValue="Ship Date" />
                      <apex:column headerValue="Tracking No" />
                   
                  </apex:pageBlockTable>
                  
                <script>colorPageBlock(document.getElementById("{!$Component.SectionColor1}"), "#484848");</script> 
            </apex:pageBlockSection>
           </apex:repeat>
        </apex:pageBlock>

    </apex:form>
</apex:page>

Thursday 23 July 2015

How to Crack Dev 401 | Salesforce Dumps 2015 Part 1




 1).  In Data loader 50,000 more records CRUD at a time
A. True
B. False
Ans: A
 2).  ID’s are identical in
A. Production, full copy sandbox, developer
B. Production and full copy sandbox only
C. Production , developer
D. None
Ans:B
 3).  Maximum No of Master Details per child object
A. 1
B. 2
C. 3
D. 4
Ans:B
 4).  For the user object what can you do in the page layout
A. custom link
B. inline vf page
C. custom button
D. custom field
Ans:ABD
 5).  For approval process who can be the submitter
A. profiles
B. roles and subordinates
C. active team members
D. None
Ans: AB
 6).  In Page Layout can you add inline vf
A. True
B. False
Ans:A
 7).  What does out of the box salesforce give you?
A. data warehouse
B. approval process
C. workflow rules
D. validation rules
Ans: BCD
 8).  A developer wants to ensure that when a parent record is deleted, child records are not deleted. Which relationship should the developer choose?
A. lookup
B. master-detail
C. many-to-many
D. master-to-master
E. None
Ans:A
 
 9)). Which statement is true about a custom tab?
A. It can only be included in one application.
B. It can only be included in standard applications
C. It can be included in as many applications as desired.
D. It can only be included in custom applications
Ans:C
 10).  When would a developer use upsert and external IDs?(Choose two answers.)
A. To integrate with an external system
B. To migrate customizations from sandbox to production
C. To load related records without knowing Salesforce record IDs
D. To use the Force.com API to query for data
Ans:AC
 11).  A group of executives has requested a convenient way to see daily metrics without having to log in to Salesforce. How would a developer accomplish this goal?
A. the users’ home page layouts to include a dashboard
B. Create a Workflow rule that sends a link to the dashboard in an email.
C. Schedule the dashboard for daily refresh and email distribution.
D. Create a series of daily recurring events providing the dashboard link.
Ans:C
 12).  A group of executives has requested a convenient way to see daily metrics without having to log in to Salesforce. How would a developer accomplish this goal?
A. the users’ home page layouts to include a dashboard
B. Create a Workflow rule that sends a link to the dashboard in an email.
C. Schedule the dashboard for daily refresh and email distribution.
D. Create a series of daily recurring events providing the dashboard link
Ans:C
 13).  If you want the a list of positions what dashboard would you use
A. metric
B. table
C. chart
D. gauge
Ans:B
 14).  Time-dependent workflow will not work with which type of workflow evaluation criteria
A. Only when a Record is created
B. Every time a record is created or edited
C. Every kind of workflow evaluation criteria
D. When a Record is edited and it did not previously meet the rule criteria
Ans:B
 15).  Which of the following is a standard Profile?
A. Sales User
B. Marketing User
C. Invoice Manager
D. Contract Manager
Ans:AC
 16).  What is the maximum number of master-detail relationships that can be created on a custom object? Select the Right answer
A. 1
B. 2
C. 4
D. Unlimited
Ans:B
 17).  An organization has decided to manage hiring and positions. A custom object has been created to manage all new job positions. All positions below $50,000 must be approved by the hiring manager, and positions above $50,000 must be approved by the hiring manager, and the regional hiring manager. What would a developer use to declaratively fulfill the requirement?
Select the Right Answer
A. Apex Code, to check the position’s salary and assign to the appropriate resource for approval
B. Approval process
C. Validation rules
D. Dynamic Routing Approval
Ans:B
 18).  A developer has created a junction object what is the significance of the first master-detail (primary) relationship? Select the Right Answer
A. Look and feel, the junction object’s detail and edit pages use the color and any associated icon of the primary master object.
B. You cannot delete the primary relationship.
C. You cannot rename the primary relationship.
D. There is no significance
Ans:A
 19).  An organization has created an application manage new hires and job positions. A custom object has been created to manage all job positions. Using an approval process they have configured the application to have the first step of the process require approvals from three different hiring managers. Select the two (2) possible approval choices based on multiple approvers for an approval step. Select TWO Right Answer
A. Approve or reject based on the first response
B. Require unanimous approval from all selected approvers
C. Require majority approval from all selected approvers
D. Require x out of y approval from all selected approvers
Ans:AB
 20).  Which of the following is NOT a step in creating a junction object? Select the Right Answer
A. Creating the custom object to serve as the junction object between the two master objects
B. Creating two master-detail relationships
C. Customizing the related lists on the page layouts of the two master objects
D. Creating two lookup relationships
Ans:D
 21).  When a record has been rejected by all approvers, Salesforce executes all final rejection actions. Which of the following is NOT a possible final rejection action? Select the Right answer
A. Lock the record from being edited
B. Send an email to a designated recipient
C. Delete the record
D. Update a field on the record
Ans:C
 22).  Which of the following cannot be used on a User Page Layout? Please select two (2) choices. Select TWO choices.
A. Tags
B. Links
C. Buttons
D. Custom Fields
E. Inline Visualforce
Ans:AC
 23).  An organization wants to leverage a custom objects to track bugs. The organization wants the ability to related bugs to parent bugs in a parent-child relationship. What type of relationship should be used? Select the Right Answer
A. master-detail
B. self
C. hierarchical
D. many-to-many
Ans:B
 24).  An organization wants to leverage the import wizards to import different types of data.What type of data cannot be imported through the wizard? Select the Right Answer
A. Accounts and Contacts
B. Leads
C. Custom Objects
D. Users
Ans:D
 25).  An organization is interested in leveraging the Data Loader to load data into salesforce.com. Which of the following are NOT capabilities of the data loader? Please select two (2) choices. Select TWO Choices
A. Import greater than 50,000 records
B. Import data into 2 objects in a single transaction
C. Rollback import transactions
D. Run by command line
Ans:BC
 26).  An organization needs the ability view the value of the Opportunity Stage field on an Opportunity Product related list. Please choose the declarative method of fulfilling the requirement. Choose the Right answer
A. Create an Apex method to replicate the value on the child object, and set the field level security to read-only and expose the new field on the Opportunity Product related list.
B. Create a cross object formula field on the Opportunity Product object and expose the formula field on the Opportunity Product related list.
C. Create a validation rule on the Opportunity Product object.
D. Create a new pick list field called Stage on the Opportunity Product object, and expose the filed on the Opportunity Product related list.
Ans: B
 27).  A developer wants to leverage the console to view to see the parent object of the child object in focus on the console. How would a developer specify what related list fields are displayed on the parent object? Choose the Right answer
A. On an child object’s mini-page layout
B. On an parent object’s mini-page layout related lists field selection
C. On the parent object’s page layout related lists field selection
D. You cannot modify the related fields on the console view
Ans:C
 28).  An organization has two custom objects to track job positions and salaries for those positions. Everyone in the organization should be able to view the positions however, only select users can view the salary records. What steps should a developer take to ensure the requirement is fulfilled? Choose the Right answer
A. Create a lookup relationship between positions and salaries; define public access on position and private access on salary
B. Create a master-detail relationship between positions and salaries; define public access on position and private access on salary.
C. Create a master-detail relationship between positions and salaries; define private access on position and create sharing rules on salary.
D. Create a lookup relationship between positions and salaries; define public access on position and public access on salary; create sharing rules on salary to restrict visibility.
Ans:B
 29).  A developer has created a custom field marked as an external id on an object. If two records in the object have the same external id, and an upsert action occurred for that same external id what would happen. Choose the Right answer
A. The first matching external id record would be updated
B. Both matching external id records would be updated
C. A new record is created
D. An error would be reported
Ans:D
 30).  A developer has a requirement to collect the state and the cities for the state selected on account page layout. Once the user selects a state only the possible cities in that state should be available for entry, what is the best declarative method for fulfilling this requirement. Choose the Right answer
A. Create a workflow rule that will update the city once a state is entered
B. Create a validation rule which will cause an error if the city is not in the state that has been entered
C. Create a dependent pick list for cities based on the state that has been entered
D. Create a formula field that lookups the valid cities for the state entered
Ans:C
 31).  A developer has created an approval process. What would require that a formula entry criterion be used versus standard criteria? Choose the Right answer
A. User profile evaluates to ‘System Administrator’
B. Determine if the record is newly created
C. Determine if a record has been updated
D. Determine if a field has been changed
Ans:D
 32).  An organization has created a HR application which contains a custom object for job positions and candidates for those positions. The HR managers want to see a view of the position with the best candidates for that position and not just all the candidates listed. What is the best method to fulfill the requirement? Choose the Right answer
A. Add an inline Visualforce Page on the job position page layout
B. Add the candidate related list to the job position page layout
C. Create a validation rule on the job position page layout
D. Create a formula field on the job position object and add to the page layout
Ans:A
 33).  Which of the following is not process or data intensive. Choose the Right answer
A. Time entry application
B. Inventory management
C. Word processing
D. Human resource management
Ans:C
 34).  Which two (2) items most closely relate to the View layer of the Model View Controller paradigm? Select TWO correct choices
A. Page Layout
B. Validation Rule
C. Custom Tab
D. Custom Field
Ans:AC
 35).  In which salesforce instances would there be identical record IDs? Choose the Right answer
A. Production; Full Sandbox
B. Production; Full Sandbox; Apex Sandbox
C. Production; Full Sandbox; Config Only Sandbox; Apex Sandbox;
D. Salesforce.com never repeats record IDs
Ans:A
 36).  A developer has created a time-based workflow that escalates a Lead record 10 days after it has been created if no updates have occurred. What is the best way for the developer to test that the new time based workflow rule is functioning? Please select two (2) choices.
A. User Debug Logs setup the Developer; create a new lead record; review debug logs
B. Create a new lead record; view the time-based workflow queue;
C. Setup the developer for time-based workflow queue; create a new lead record; view the time-based workflow queue;
D. Create a new lead record; view the outbound messages queue
Ans:AB
 37).  What settings can you specify on a profile? Please select two (2) choices.
A. Revoke sharing permissions
B. Enable record types
C. Enable create read, create, edit, and delete on objects
D. Specify language
Ans:BC
 38).  A manager in an organization wants to share specific fields of data to his subordinates that only he has access to. What is the best way to share specific fields of data? Please select two (2) choices. Please select two (2) choices.
A. Run As on dashboards
B. Folder Permission on a Report
C. Run As on scheduled reports
D. Folder Permission on a Dashboard
Ans:AC
 39).  Under what circumstances would the sharing button to be enabled on a detail view for a record. Choose the Right answer
A. A developer has added the button to the page layout
B. When record sharing is enabled in the user profile
C. When record sharing is set to public read only or private for the object
D. When record sharing is set to public read/write for the object
Ans:C
 40).  When creating a sharing rule what entities can data be shared to. Please select three (3) choices. Please select three (3) choices.
A. Public Groups
B. Users
C. Roles
D. Roles and Subordinates
E. Queues
Ans:ACD
 41).  A developer needs to make a field that is normally accessible by most users inaccessible on the report wizard for specific users. What the best method to fulfill that requirement? Choose the Right answer
A. Field level security
B. Remove the field from the page layout
C. Remove the field from the user profile
D. Change my display under personal settings
Ans:C
 42).  What can be done with report summary totals? Please select two (2) choices: Please select two (2) choices:
A. Calculate values from a previous report –
B. Calculations based on report summary totals
C. Highlight outliers
D. Historical analysis
Ans:BD
 43).  If a parent object has a lookup relationship defined with a child object. What happens in the child object when you delete a record from the parent? Choose the Right answer
A. The child record is deleted
B. Nothing
C. The parent record cannot be deleted
D. The child record cannot be deleted
Ans:D
 44).  How can a developer get a Custom Object added to the quick create list Choose the Right answer
A. Add the object through home page component settings
B. It is added automatically
C. Expose a custom tab for the custom object
D. Enable the quick create on the user profile
Ans:C
 45).  Select the features that are available through custom report types. Please select two (2) items. Please select two (2) items.
A. Define object relationships and fields for reports
B. Define up to 4 object relationships
C. Define anti-join relationships
D. Create analytic snapshot reports
Ans:AB
 46).  An organization wishes to have everyone view/edit records on an object except for a single person x who should only have read-only access to the object. What is the best way to implement the requirement? Choose the Right answer
A. Modify the sharing access for the object to public read/write and remove user x from the role hierarchy
B. Modify the sharing access for the object to private and remove user x from the role hierarchy
C. Modify the sharing access for the object to public read only, create a public group with everyone except user x; create a sharing rule and define read/write access to the public
group.
D. Modify the page layout to be read-only.
Ans:C
 47).  Using a formula field how would a developer calculate the number of days since a record has been created. The CreatedDate field is a DateTime type field. Choose the Right answer
A. TODAY() – DATEVALUE(CreatedDate)
B. NOW() – DATEVALUE(CreatedDate)
C. TODAY() – CreatedDate
D. CreatedDate – TODAY()
Ans:A
 48).  Salesforce.com has notified you that they have enabled the ability to update audit fields for your organization. When inserting a record which field can you set? Choose the Right answer
A. CreatedDate
B. IsDeleted
C. SysModStamp
D. UpdatedDate
Ans:A
 49).  A developer needs to create a trending report what should he/she use to get the historical data? Choose the Right answer
A. Reports
B. Analytic Snapshots
C. Roll-Up Summary
D. Report Types
E. Audit History Records
Ans:B
 50).  What is the best type of dashboard component to display a list of your top 10 customers? Choose the Right answer
A. Metric
B. Table
C. Gauge
D. Chart
Ans: B
 51).  Select the salesforce.com edition that is NOT available today Choose the Right answer
A. Professional
B. Unlimited
C. Enterprise
D. Premium
Ans:D
 52).  Using the force.com platform declarative model to build an application. Which of the following do you NOT have to do? Please select three (3) choices.
A. Install a database server
B. Configure an application using clicks not code
C. Deploy a web server
D. Administer and email server
Ans:ACD
 53).  An organization wants to create a field to store manager data on the user object. The manager field is a reference to another user record. What type of relationship should be used?
Choose the Right answer
A. master-detail
B. hierarchical
C. lookup
D. many-to-many
Ans:B
 54).  What are the data types that are supported by formula field? Please select three (3) choices. Please select three (3) choices.
A. Text
B. Percent
C. Email
D. Currency
E. Phone
Ans:ABD
 55).  What is true about a junction object? Choose the Right answer
A. A custom object that has 2 master-detail relationships.
B. A custom object that has a master-detail relationship.
C. A standard object that has 2 master-detail relationships.
D. A standard object that has a master-detail relationship.
Ans:A
 56).  What is true about a cross-object formula field for a master-detail relationship? Choose the Right answer
A. You can only create a cross-object formula field on the parent object.
B. You can only create a cross-object formula field on the child object.
C. You can create a cross-object formula field on both the parent and child object.
D. Cross-object formula field is not available for master-detail relationship.
Ans:B
 57).  When you create a custom tab for a custom object, what are the features that are available by default? Please select two (2) choices.
A. Sidebar Search Object
B. Custom Reporting
C. Quick Create
D. Ability to track Activity
Ans:AC
 58).  What are the different custom tabs that you can create? Please select three (3) choices. Please select three (3) choices.
A. Web Tab
B. Apex Tab
C. Visualforce Tab
D. Custom Object Tab
E. Standard Object Tab
Ans:ACD
 59).  For the order management application, the developer has created a custom object to store the product line and product combination. When creating an order, the product line and product combination needs to be consistent. What is the best option for implementing this? Choose the Right answer
A. Use a workflow to update the product automatically based on the product line.
B. Create a validation rule using IF
C. Create a formula field to enforce the combination
D. Create a validation rule using VLOOKUP
Ans:D
 60).  What is true about a master-detail relationship? Please select two (2) choices. Please select two (2) choices.
A. When the parent record has been deleted, all the child records will be deleted.
B. You can have a child record without the parent record.
C. You have to expose the master lookup field on the child detail page layout.
D. You cannot delete a child record.
Ans:AC
 61).  How do Salesforce enforce data access using role hierarchy? Choose the Right answer
A. Users are given access to the records owned by the users who are below the role hierarchy.
B. Users are given access to the records owned by the users who share the same role on the role hierarchy.
C. Users are given access to the records accessible by the users who are below the role hierarchy.
D. Users are given access to the records accessible by the users who are above the role hierarchy.
Ans: C
 62).  What will cause the analytic snapshots run to fail? Please select three (3) choices. Please select three (3) choices.
A. The source report has been deleted.
B. The target object has a trigger on it.
C. The running user has been inactivated.
D. The target object is a custom object.
E. The source report is saved as Matrix report
Ans:ABC
 63). What are the components belong to the Model of the Model-View-Controller design paradigm? Please select three (3) choices.
A. Custom Relationship
B. Custom Page Layout
C. Custom Object
D. Custom Field
E. Workflow Rules
Ans: ACD
 64).  Where do you change the Hover detail? Choose the Right answer
A. Mini View
B. Page Layout
C. Profile
D. Mini Page Layout
Ans:D
 65).  What layer of model-view-controller paradigm does standard or custom objects associated with? Choose the Right answer
A. View
B. Model
C. Controller
D. View and Controller
Ans:B
 66).  What is a junction object? Choose the Right answer
A. Object with lookup relationship
B. Master detail relationship
C. Object with two lookup relationship
D. Object with two master-detail relationship
Ans:D
 67).  What field can be controlled by translation workbench?
A. Rule Criteria
B. Formula
C. Validation Errors
D. Assignment Rules
Ans:C
 68).  In a master-detail relationship, what happens when the a record is deleted from parent object Choose the Right answer
A. Parent record alone gets deleted
B. Exception occurs
C. Parent and Child record will not be deleted
D. All child records are deleted
Ans:D
 69).  In a recruiting application, Salary is a child object to parent Position object via master-detail relationship. The min pay and max pay fields of salary object cannot be modified when Position status on the parent is “Approved”. How would a developer design this?
A. Create a Visualforce component on Position detail page
B. Rollup-Summary Field
C. Validation rule on Position object
D. Formula field on the Salary object
E. Validation rule on the Salary Object
Ans:E
 70).  Object X has a lookup to Object Y. What among the following statements are TRUE Please choose two (2).
A. Fields of both X and Y are accessible from Object Y.
B. Fields of Object Y can be accessed from Object X.
C. Fields of both Y and X are accessible from Object X.
D. Fields of Object X can be accessed from Object Y.
Ans: BC
 71).  In master-detail relationship scenario where the fields of the parent object needs to be displayed in the related list. How will a developer design this: Choose the Right answer
A. Cross-object formula field
B. Workflow rule
C. Validation Rule
D. Assignment rule
Ans:A
 72).  What are the components of the dashboard that use grand totals Please choose two (2) items.
A. Chart
B. Metric
C. Table
D. Gauge
Ans:B
 73).  Universal Containers needs to make all records of an object visible to all users when it is in “Approved” status. The records are created with “New” status and are only visible to a select set of users. How will a developer implement this? Choose the Right answer
A. Set the object level sharing to Private, add a workflow rule to update the sharing rule when status changes.
B. Set the object level sharing to Public Read-Only, restrict the sharing when status is ‘New’.
C. Set the object level sharing to Private, create a public group with appropriate users, modify manual sharing to public group based on status
D. Create role hierarchy, modify the user profiles when status changes
Ans:C
 74).  In a master-child relationship between a standard object and custom object. Which of the following statements is NOT true. Please select two (2) items
A. Standard object is always the master
B. Custom Object is always the master
C. Custom object is always a child
D. Standard or custom object can be a master
E. Standard object is never a child
Ans:BD
 75).  A customer has a requirement to filter on columns in the related list. As a developer how will you accomplish Choose the Right answer
A. Use the filter option in the related list section of the Page Layout
B. Use the filter option in the related list section of the Mini Page Layout
C. Use the filter option in the detail page layout of the related list object
D. Build a visual force component with filter to replace the related list section of the Page Layout
Ans:A
 76).  How do you highlight totals in a report Choose the Right answer
A. Roll-up Summary Field
B. Formula Field
C. Custom Summary Field
D. Summary Totals
Ans:D
 77).  Recruiting application has a Position object that contains location, department and other information relating to a position. A report needs to customized that is grouped by department but not on locations. What is the best type of report would a developer choose? Choose the Right answer
A. Summary Report
B. Tabular Report
C. Matrix Report
D. A report using visual force
Ans:A
 78).  A job application object has a child review object to store candidate review. The review needs to be tracked between a score of 1 to 5. The score has to be a choice between 1 and 5 displayed as a radio button. How will a developer cater to this requirement? Choose the Right answer
A. Create 5 fields for scores (1 to 5) of type radio-button and use it in review page layout.
B. Create a dependent picklist that feeds the radio button type field.
C. Create a formula field
D. Create visual force page with radio buttons for review object
Ans:D
 79).  In a data model object A is related to B, B is related to C. How will a developer create a report to include fields of A and C. Choose the Right answer
A. Create lookup relationships between A,B and C
B. Create a Custom Report type with A, B and C, and use it in the report
C. Create a custom report with A and C fields as relationships already exist
D. Report cannot be created Custom Objects automatically have some standard fields
Ans:C
 80).  Custom Objects automatically have some standard fields
A. True
B. False
C. Some of them have
Ans:A
 81).  Custom Tabs have properties such as: Select all that are true
A. Custom Fields
B. Relation to other objects
C. Page Layouts
D. User Tabs
E. Audio Visual Capabilities
F. They do not have any properties
Ans:F
 82).  Changing the data type of existing custom field is possible, but doing so may cause loss of
data
A. True
B. False
C. Maybe
Ans:A
 83).  Custom Fields are store for how many days after deletion
A. 10 Days
B. 30 Days
C. 45 Days
D. 100 Days
Ans:C
 84).  Standard Picklist cannot be a dependent picklist Choose the correct answer
A. It can be in some cases
B. It depends on the version of Salesforce.com you are using
C. This is correct, Standard picklist can only be a controlling picklist
D. This is incorrect, Standard picklist can be a controlling as well as dependent picklist
Ans:C
 85).  Required and Unique field options works on Custom Fields only True or False
A. True
B. False
Ans:A
 86).  Fill in the blanks. Encrypted fields allow for masking data for all users except those with the ———— permissions Fill in the blanks
A. Read all data
B. View all Data
C. Modify all data
D. Administrator permissions
Ans:D
 87).  The Force.com platform supports the following relationship types Select all which apply
A. Self
B. Lookup
C. Master Detail
D. Many to Many
E. Many to All
F. One to One
G. One to all
H. Validation Rules
Ans:ABD
 88).  Fill in the blanks. ______________ lookup relations are allowed per object Fill in the blanks
A. 10
B. 20
C. 25
D. 40
Ans:C
 89).  Junction Object is a Custom Object with three master detail relationships True or False
A. True
B. False
C. Sometimes it has
Ans:B
 90).  Any member in a Queue has the same access to all records in the queue that an owner would have.
A. True
B. False
C. Not always
Ans:A
 91).  Select which is not applicable. Capabilities of a Workflow includes, Not Applicable to be
selected
A. Tasks and Alerts
B. Field Updates
C. Run Reports
D. Outbound Messaging
E. Approval Processes
F. Dashboard Refresh
G. Load Data through Data Loader
Ans:CEFG
 92).  A queue is a location where records can be routed to wait processing by a group member
A. True
B. False
C. Maybe sometimes
Ans:A
 93).  Roll up Summary Field works in the case of which relationship Select the correct choice
A. Master Detail
B. Master Master
C. Workflow
D. Validation Rules
E. Lookup
F. Do not lookup
G. Master to all
Ans:A
 94).  Validation Rules can contain a Formula or an expression that evaluates the data in one or more fields and returns a value of “True” or “False”
A. True
B. False
C. Maybe sometimes
Ans:A
 95).  Workflow Rules are automated processes that trigger criteria based on your business requirements True or False
A. True
B. False
Ans:A
 96).  Profile have the following permissions All Applicable to be selected
A. View All Data
B. Delete All Data
C. Modify all data
D. Customize Application
E. Data Loader only user
F. Password never expires
G. Load Data through Data Loader
Ans:ACDF
 97).  Cross Objects formulas can reference fields on parent or grand parent object up to how many levels Select the correct choice
A. 2
B. 5
C. 8
D. 12
Ans:B
 98).  Custom Formula fields can reference fields on related objects True or False
A. True
B. False
Ans:A
 99).  In Rollup Summary there is an option to include all records in the roll-up or just that meets certain criteria True or False
A. True
B. False
Ans:A
 100).  User can have access to more than one record types for an object True or False
A. True
B. False
Ans:A

Get Gmail, Docs, Drive, and Calendar for business