Header Ads Widget

SFDC REAL TIME INTERVIEW QUESTIONS || INTER VIEW STUFF

SFDC REAL TIME INTERVIEW QUESTIONS || INTER VIEW STUFF



1)If iam having 3 users  like A,B,C IF user A having 3 records,user B having 2 records and user C having 5 records but here my requirement is they won’t see each others records how can you do this?

Ans: Private



2)in field update workflow I have written a validation rule like if iam having a field it will take the input upto 99 whenever iam entering more than that it will display error message. For each time the field update it will update the value 100.intially iam take some value with in the range 99 and after that I enter 1000 then how much value will update on field?

Ans:Validation rules fire before saving the record and workflows will fire after saving the record

So value will be 100 only before saving the record it displays an error message and field containing the value for the previous record value.



3)if iam having 2 objects they dint relate each other but I want to show them in a  single report so that what can be used here?

Ans:Join reports



4)if iam having a check box and beside that iam having a textbox and also having a save button here my requirement is  initially text box is hidden whenever I select the checkbox and click the save button the text box will be visible so which attreibute we are using initially hidden and after that visible ?

Ans:By Using rendered attribute we can achive this.



5)if I have a field in that when ever a record is saved it will update the value with 100 so which events we are used?

Ans:before events



8)by using change sets can we move buttons to production?

Ans: Yes we can



9)By using change sets can u move approval process to production ?

Ans: yes we can



10)if one field is hidden by using formula field can u calculate the value is it possible?

Ans: Yes we can



11)what is the use of include attribute?

Ans : we can include one vf page in another page



12)can u display pdf in salesforce?

Ans : Yes by using renderas tag



13)if I want to find the word rob then which one you are using soql or sosl?

Ans:sosl

14.Can Salesforce generate an email alert when using task as the object to which the workflow rule applies?

A. Workflow automates email alerts, tasks, field updates and outbound messages based on the customer´s organization's processes. When using task as the object to which the workflow rule applies, email alert will not be an immediate and/or time-dependent actions to the workflow rule.

As an alternative method of sending emails when creating tasks, you can create a workflow rule to send an outbound message to a Web service. The Web service will send an email to the owner of the task. For example, you could create a workflow rule that sends a SOAP message whenever a task is created or edited and is in "Not Started" status. Currently, workflow on tasks do not allow you to send an email.



15.what is relationship between Account and Contact?

A. Account and contact behaves as master detail in business logics but on UI it is a lookup relationship. Let me explain you a bit more.

You can create a contact without filling account i.e it shows that there is a lookup relationship between account and contact.

If you have created a contact with account and you delete that account then contact will be deleted, this shows that it is in Master-Detail relationship. This is a standard behavior.

So we can say it in both ways, but it documentation it is a lookup relationship.



16. what is Custom settings and how deploy it .any problem faced in production

related to custom settings .how u resilved that.?

A.When deploying a Custom Settings object, you should be able to also deploy the custom settings records. this should also be available when creating a managed package. When creating a package you should be able to include your default configuration settings.



17.)how to import records from Juction Objects.?

A. We cannot run import wizard over a Junction Object.

We can only run Analytical snapshot over it.

hiden fields can we used in Formulae fields



18.which components cant deploy through the change sets.

A.you cannot rename or delete the components using changesets.



19.how create adotional fields in task, event and acitivity objects?

A)By using Activity Custom Object we can create custom fields for Task,Event

And Activity.



20. what is deploy to server and save to server?

Save to Server - Save the updated code to your development org (Dev Edition / Sandbox) from Eclipse IDE. There is no test methods run at this time.

Deploy to Server -  Deploying to code to any kind of instance. All the test methods execute in the background before you are deploy the code. The environment can be Dev Edition/Sandbox or your Production instance.




21.Map Will accept duplicate values ?

eg i in map (1-a;2-b;3-c) key pair values if insert map(1-d) it will accept the value .which value will map will returns



22. What isModifyAll And ModifyAllData.

 Ans : Modify All Data : Create, edit, and delete all organization data, regardless of sharing settings.

Modify All : Give All (Read, Create, Add, Delete) permission to selected Object.



23. how to maintain user license in SFDC?

You may have more than one type of user license in your organization. A user license entitles a user to different functionality within Salesforce and determines which profiles and permission sets are available to the user.

To view a list of the active user licenses in your company, click Your Name | Setup | Company Profile | Company Information. This page lists the following for each type of user license:

§ Status indicates the status of the license.

§ Total Licenses indicates the number of licenses for which your company is billed and that are available to you.

§ Used Licenses is the number of licenses that you have assigned to users.

§ Remaining Licenses is the number of unused licenses.

If Checkout is enabled for your organization, you can click Buy More Licenses to go to Checkout to buy additional user licenses.

In addition to license types, the following portal login information is listed for organizations that have Customer Portals or partner portals enabled:

§ Monthly Logins Allotted shows the maximum number of customer or partner portal logins allowed per month.

§ Monthly Logins Used indicates the number of successful logins for all users associated with a customer or partner portal user license for the month.

No



24. can we  use SOSL In Triggers and Apex Class.

Ans: SOSL CAN NOT BE CALLED FROM TRIGGERS.



25.what is Action Fucntion and action support  in AJax methods

Ans :

<
apex:actionFunction :A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX

request. An <apex:actionFunction> component must be a child of an <apex:form> component

action support:A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by the

server when a particular event occurs, such as a button click or mouseover







 26.If one object in Salesforce have 2 triggers which runs “before insert”. Is there any way to control the sequence of execution of these triggers?

Ans : Salesforce.com has documented that trigger sequence cannot be predefined. As a best practice create one trigger per object and use comment blocks to separate different logic blocks. By having all logic in one trigger you may also be able to optimize on your SOQL queries.



27.How to restrict any Trigger to fire only once ?

Ans:Triggers can fire twice, once before workflows and once after workflows,

“The before and after triggers fire one more time only if something needs to be updated. If the fields have already been set to a value, the triggers are not fired again.”

Workaround:

Add a static boolean variable to a class, and check its value within the affected triggers.

1              public class HelperClass {

2                 public static boolean firstRun = true;

3              }

4              trigger affectedTrigger on Account (before delete, after delete, after undelete) {

5                  if(Trigger.isBefore){

6                      if(Trigger.isDelete){

7                          if(HelperClass.firstRun){

8                              Trigger.old[0].addError('Before Account Delete Error');

9                              HelperClass.firstRun=false;

10                       }

                                               

11                   }

12               }         

13           }



28. How you can provide the User Login (Authentication) in Public sites created by Salesforce.

Answer : We can provide the authentication on public sites using “Customer Portal”.



29. Suppose you are the standard user, you have all the CRED permissions on CAMPAIGN object but you don't have access to create a record, why?

Ans:) marketing user option should be checked for that user to access the CAMPAIGN object.



30. In approval process, suppose three persons has to approve, if majority people approve then it should approve otherwise it should not be approve?

Ans:) Using standard approval process it is not possible, using dynamic approval process it is possible. In standard approval process all users should approve then only record will get approve.



31. If the OWD for account object is private then is it possible to access the account record by other users apart form the owner?

Ans:) 1. All the people above the role hierarchy, they can access the records.

          2. By using sharing rules, we can share those records to other users.

          3. Account Team members they can access these records.

32.If I put "renderas" attribute as "PDF" then it displays PDF document,But i want the same in MSword format.Then how you will do this?

A)<apex:page contentType="application/msWord" cache="true">

  <!-- Begin Default Content REMOVE THIS -->

  <h1>Congratulations</h1>

  This is your new Page

  <apex:form>

  <apex:pageBlock>

  <apex:commandButton value="Button" action="{!method1}"/>

  </apex:pageBlock>

  </apex:form>


  <!-- End Default Content REMOVE THIS -->

</apex:page>

Without "cache" attribute also it works, But in some browsers it doesn't work without "cache" attribute.



33. If there is a validation rule if amount = 100 then it should display error msg, Then I saved the record by giving value as 1000 then I had written a workflow if amount > 100 then I am updating amount field value with 100. Then what will be the result?  A) First validation rules will get execute then workflow rules will be execute so the answer is 100 (Even though there is validation rule because of the workflow it will accept 100 in amount field.



34. What is the difference between task and event?

A) Task: Task is nothing but work assigned to a particular person, it doesn't have certain time limit.Event: It has certain time limit in that time only all persons should assemble after the time limit over, event will get complete.



35. What the record criteria meets for a time dependent workflow email has submitted in queue which will trigger the email in one month later if somebody modified the record which won't meet the time dependent workflow rule criteria, what will happen?

A) Email won't be triggered since workflow criteria is not satisfied for the record, salesforce will remove the action to send the email from the queue.



36. How many ways we can make field mandatory, if the field is mandatory at page layout level and if we try to inert records through data loader with out populating those mandatory fields what will happen?

A) In following ways we can make fields mandatory:

1. At Field Level.

2. At the page layout level.

3. Through validation rules.

If the field is mandatory at page layout level then only while inserting records from page layout level if we won't populate the fields with values it will trow error. If we insert records from data loader it won't throw. Even if we mention the record type while inserting record through program it will throw error message.

37.I have 1000 records, how can I execute 200 records each time in Trigger?

By default triggers will run in a batch of 200 records. For 200 record one trigger invocation, even in case of Bulk API.



Consider a scenario where you're inserting 1100 records then it will be run in 6 batches

200 * 5  + 100 * 1 = 6 (Invocations)

-------------------------------------------

* Use SOQL for loops to operate on records in batches of 200.

* SOQL for loop, which iterates over the returned results in batches of 200 records.

* This reduces the size of the ml list variable which now holds 200 items instead of all items in the query results, and gets recreated for every batch.



for (List<Merchandise__c> ml : [SELECT Id,Name FROM Merchandise__c])

{

// Do something.

}

* You can also use batch apex class to process large number of records.



38. There are 8 Fields and I want to assign 4 fields to be visible by one user and another 4 fields to another user, How can we do that?

Q. How can I hide field apart from field level security and page layouts?

(For the above both questions)



A.            Using Permission Sets, We can increase the permissions to the user without creating new profile for a single user. Profiles also contain all the options which are in Permission Sets.

Important Points:

* To override the profile permissions, we use permission sets.



40.Concept behind Validation Rules in SFDC

Purpose: Validation rules are written to maintain the integrity of the data.




Mandatory fields while writing a validation rule are Name, Formula and Error Message.



Name: Unique name of validation rule



Formula: The formula is written in a way that it evaluates to true for the condition in which you do not want your record to be saved.



Business Case: If opportunity stage is negotiation then discount is mandatory.

         

Formula for Business Case: Ispickval(stage,'negotiation') && Isblank(discount)



Error Message: This is the message which will be displayed to the business users. The thumb rule is that it should be Short and Crisp.



Location of error message:

Error message can be placed at two places:

Top of the page: Displays error message  at the top of the page

@ field: Displays error message at the field



41.Junction Object or Many to Many Relationship in SFDC

There is no out of box relationship present in SFDC i.e. Many to Many in nature, So to have a many to many relationship in SFDC a JUNCTION OBJECT is required.



A junction object joins the two objects with two master detail relationship. Junction object is always on the detail side of the object.



                                   Obj1  M : 1  Junction  1 : M  Obj2



This way junction object creates Many to Many relationship between Obj1 and Obj2.



One example of many to many relationship among standard objects is Case and Solution. One case can have many solution attached to it and one solution can be used in resolving many cases.



42.Different Ways to make a field mandatory in salesforce.com

As we know there are different standard ways of making a field mandatory in SFDC. This is a brief about all of those ways. Sure shot CON 201 and ADM 201 Question :-)

             Make a field Required while creating it by checking the Required check box:- This makes that field required for everyone in the organization. In other words this is like making the field required from Field Level security. 

             This will be used if the requirement says " I want to make sure that all sfdc users should enter Salary Amount in the payment details record"

             Make a Field required via Page layout:- This is done to make sure that for that particular Page layout this field is mandatory and for others it is not.

             The Requirement will be like " I want to make salary amount mandatory in payment details object for salary pagelayout but not for Interviewed people in Interviewees salary pagelayout"

             Make a field required by a Validation Rule:- This is to make sure that a field is mandatory on a particular condition.

             The Requirement will be like "Make the Salary Amount mandatory if the  Interview status says Selected"



43.How to make the Rich Text Field Mandatory by a Validation Rule

If you want to make the Rich Text Field Mandatory in SFDC by a Validation rule thenISNULL, ISBLANK functions will not work. You will require to use the LEN (Length) Function and make sure the validation rule looks like

                        IF LEN (Rich Text Field) == 0 then fire the Validation Rule

with this approach the validation rule will make sure the Rich Text field always has the value.

Business Case:- Make Other (Rich Text Field) Mandatory when the Reason (Picklist Field) is selected as Others.



Note:- ISNULL was previously used for the Numeric fields whereas Length function was used for Text field. Now ISBLANK is a new function which can be used for both the Text as well as the Number field.



44. How to limit number of records to be processed per transaction in Batch Apex?

The Database.executeBatch method takes an optional parameter scope. This parameter specifies the number of records that should be passed into the execute method.



Syntax:



Database.executeBatch(instance of batch class,scope);



Sample:



AccountUpdate au = new AccountUpdate();

Database.executeBatch(au,1500);



The limit for scope parameter is 2000.



The default value is 200.



If the scope value is greater than 2000, it will consider as 2000 and then process.





How to test static methods in Salesforce?

To test static methods in Salesforce, we have to call the method along with the controller name, not with the object of the controller.

Example:



Apex Class:



public class example

{

    public static integer add(integer a, integer b)

    {

        return (a+b);  

    }



    static testMethod void testforExample()

    {

        example.add(8,9);

    }

}


Post a Comment

0 Comments