What is the difference between With Sharing and Without Sharing ?
Answer: For example, if a method is defined in a class declared with sharing is called by a class declared with without sharing, the method will execute with sharing rules enforced. … For example, if the class is called by another class that has sharing enforced, then sharing is enforced for the called class.
If you organization Workflow’s limit is over and if you want to write a workflow immediately and it critical, what will you do ?
Answer:
1. De-activate any workflows and create it using trigger and then do the new workflow.
or
2. Go for Schedule apex or trigger to achieve this workflow.
In which object Roles are stored ?
Answer: UserRole
What are the uses of the tag ?
Answer: A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request. A component must be a child of a component. Because binding between the caller and is done based on parameter order, ensure that the order of is matched by the caller’s argument list.
Unlike, which only provides support for invoking controller action methods from other Visualforce components, defines a new JavaScript function which can then be called from within a block of JavaScript code.
Note: Beginning with API version 23 you can’t place inside an iteration component and so on. Put them after the iteration component, and inside the iteration put a normal JavaScript function that calls it.
This tag supports following attributes:
Action:
The action method invoked when the actionFunction is called by a JavaScript event elsewhere in the page markup. Use merge-field syntax to reference the method. For example, action=”{!save}” references the save method in the controller. If an action is not specified, the page simply refreshes.
Focus:
The ID of the component that is in focus after the AJAX request completes.
Id:
An identifier that allows the actionFunction component to be referenced by other components in the page.
Immediate:
A Boolean value that specifies whether the action associated with this component should happen immediately, without processing any validation rules associated with the fields on the page. If set to true, the action happens immediately and validation rules are skipped. If not specified, this value defaults to false.
Name:
The name of the JavaScript function that, when invoked elsewhere in the page markup, causes the method specified by the action attribute to execute. When the action method completes, the components specified by the reRender attribute are refreshed.
Onbeforedomupdate:
The JavaScript invoked when the onbeforedomupdate event occurs–that is, when the AJAX request has been processed, but before the browser’s DOM is updated.
Oncomplete:
The JavaScript invoked when the result of an AJAX update request completes on the client.
Rendered:
A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true.
ReRender:
The ID of one or more components that are redrawn when the result of the action method returns to the client. This value can be a single ID, a comma-separated list of IDs, or a merge field expression for a list or collection of IDs.
Status:
The ID of an associated component that displays the status of an AJAX update request. See the actionStatus component.
timeout:
The amount of time (in milliseconds) before an AJAX update request should time out.
What are the access modifiers in the apex ?
Answer: If you do not specify an access modifier, the method or variable is private. This means that the method or variable is visible to any inner classes in the defining Apex class, and to the classes that extend the defining Apex class.
What are reference variables in apex ?
Answer: Passing Parameters By Reference and By Value in Apex. … “In Apex, all primitive data type arguments, such as Integer or String, are passed into methods by value. This means that any changes to the arguments exist only within the scope of the method. When the method returns, the changes to the arguments are lost.
What is on-Demand process ?
Answer: On-demand process is nothing but “pay for what you use” policy.
We can subscribe to what we want and pay-as-you-go model.
Explain The Apex Data Manipulation Language (dml) Operations ?
Answer: Use data manipulation language (DML) operations to insert, update, delete, and restore data in a database.
You can execute DML operations using two different forms:
Apex DML statements, such as:
insertSObject[]
Apex DML database methods, such as:
Database.SaveResult[] result = Database.Insert(SObject[])
While most DML operations are available in either form, some exist only in one form or the other.
The different DML operation forms enable different types of exception processing:
Use DML statements if you want any error that occurs during bulk DML processing to be thrown as an Apex exception that immediately interrupts control flow (by using try. . .catch blocks). This behavior is similar to the way exceptions are handled in most database procedural languages.
Use DML database methods if you want to allow partial success of a bulk DML operation: If a record fails, the remainder of the DML operation can still succeed. Your application can then inspect the rejected records and possibly retry the operation. When using this form, you can write code that never throws DML exception errors. Instead, your code can use the appropriate results array to judge success or failure. Note that DML database methods also include a syntax that supports thrown exceptions, similar to DML statements.
Will the Flow supports bulkification mechanism ?
Answer: Yes , flows support bulk records processing also.
What is an alternative for workflow ?
Answer: Process Builder or Flows or Trigger or Schedule apex or
What is the use of isNew() ?
Answer: Checks whether the record is newly created. Salesforce Video Training
What is the difference between List and Set ?
Answer: Another significant difference between List and Set in Java is order. A list is an Ordered Collection while Set is an unordered Collection. List maintains insertion order of elements, means any element which is inserted before will go on the lower index than any element which is inserted after.
Data loader ? and which format it will support ?
Answer: Data loader is a tool to manage bulk data. It will support .csv format of Excel.
What are the Disadvantages by using Batch Apex processing ?
Answer: Disadvantages of batch processing:
It runs asynchronously, which can make it hard to troubleshoot without some coded debugging, logging, and persistent stateful reporting. It also means that it’s queued to run, which may cause delays in starting.
There’s a limit of 5 batches in play at any time, which makes it tricky to start batches from triggers unless you are checking limits.
If you need access within execute() to some large part of the full dataset being iterated, this is not available. Each execution only has access to whatever is passed to it, although you can persist class variables by implementing Database.stateful.
There is still a (fairly large) limit on total Heap size for the entire batch run, which means that some very complex logic may run over, and need to be broken into separate batches.
How many users have you supported ?
Answer: Number of users in the Salesforce organization. It helps the recruiter to understand your scalability.
In which object all email templates are saved ?
Answer: EmailTemplate
What is Salesforce sites ?
Answer: Used to show data from our organization for public view.
In which object all Account Team Members are added ?
Answer: AccountTeamMember
Auto-response rules and Escalation rules(for which objects are mandatory) ?
Answer: Case and Lead.
What is Workarounds for Missing Apex Time.format() Instance Method ?
Answer: You could just split the DateTime format() result on the first space – does that give you what you’re looking for?
public String myDateFormat(DateTime dt) {
String[] parts = dt.format().split(‘ ‘);
return (parts.size() == 3) ? (parts[1] + ‘ ‘ + parts[2]) : parts[1];
}
produces
6:38 PM
for me in English (United States), and
18:42
in French(France).
UPDATE:
As tomlogic points out, the above method is not very robust – some locales may include spaces in the date or time portion of the format, and the ordering is not consistent. This second attempt assumes that the date and time are separated by zero or more spaces, but handles spaces within the two portions, and either ordering of date and time. The only assumption made is that the formatted Date is contained within the formatted Time:
public String myDateFormat(DateTime dt)
{
return dt.format().replace(dt.date().format(), ”).trim();
}
Seems to work fine for Hebrew, Vietnamese & Korean, as well as English and French.
What is Documenting Salesforce.com in Apex class files ?
Answer: I have used apexDoc for a while and we are starting to roll it out more fully for our use at my organization. It is open source software and so you could always contribute some updates for it: What features are you wanting to add to it that it doesn’t have (just to give a flavor)?
In answer to your questions:
I don’t think anybody has successfully managed to do this. There is an idea of the ideas exchange for it to be done but it seems to gain very little support.
Theoretically, it should be pretty easy as apex is a Java DSL. Have you tried running Doxygen and if so what errors does it throw up?
I use Apex Doc to generate some basic output and then have a little script tied in to copy across custom CSS and things. It isn’t perfect but it does the small amount we need at the moment.
I believe the IDE is being open sourced at some time in which case I would imagine the antlr grammar file would become available which may help you out.
I know it is not really an answer for what you wanted to hear per se, but sadly it’s all we have atm (and I would love a nicer documentation generator!!) Learn Salesforce Training Online From Real Time Experts
In which object all Opportunity Team Members are added ?
Answer: OpportunityTeamMember
Difference between REST and SOAP API’S ?
Answer: Varies on records that can be handled.
In Which object all Apex Pages are stored ?
Answer: ApexPage
What is creating debug log for users ?
Answer: Track code.
How cases are created ?
Answer: Email to Case and Web to Case Top 50 Salesforce Apex Interview Questions and Answers Pdf
What is after undelete ?
Answer: While retrieving from recycle bin
In which object all Approval process are stored ?
Answer: Approval
Is there an average method for apex math ?
Answer: Unfortunately the standard math methods only include simpler operations (i.e. those that work on a single, or two values), so it looks as though you’ll have to roll your own method.
Of course, the number of script statements executed will be proportional to the length of the list, so of the lists are ever of a fixed size it could be worth using a macro to generate the addition part for you:
Int sum = i[0] + i[1] + … i[n];
Doing so would only count for one statement, but you’ll only need this if governor limits are of concern which is often not a worry.
If govenor limits aren’t an issue you could create a function along these lines:
Skip code block
Integer[] myInts = new Integer[]{1, 2, 3, 4, 5, 6, 7};
Integer total = 0;
Double dAvg;
for (Integer i : myInts) {
total += i;
}
dAvg = Double.valueOf(total) / myInts.size();
return dAvg;
Will Trigger.new supports —>Insert, Will Trigger.Delete supports —>Delete ?
Answer: Yes.
What is a constructor ?
Answer: A constructor is a special method of a class or structure in object-oriented programming that initializes an object of that type. A constructor is an instance method that usually has the same name as the class, and can be used to set the values of the members of an object, either to default or to user-defined values.
What is Inline visualforce page ?
Answer: Having vf page in pagelayout.
What are the Grammar for creating an Apex parser ?
Answer: Keep an eye on Apex tooling API, which is used in Developer console. This is supposed to be released to public access soon.
If is child is mandatory field in lookup and I m deleting Parent, will child get deleted ?
Answer: No.
What is the use of the static variables ?
Answer: Static variables are used when only one copy of the variable is required. so if you declare variable inside the method there is no use of such variable it’s become local to function only.. Variables declared static are commonly shared across all instances of a class. Top 50 Salesforce Developer Interview Questions and Answers Pdf
Junction object ? when will we use ? If we delete the junction object what will happen ?
Answer: For many to many relationship.
Does ‘default value’ do anything if the object is created through Apex ?
Answer: New feature coming in the next release:
Foo__c f = Foo__c.sobjecttype.newSObject(
recordTypeId, // can be null
true); // loadDefaultValues
Can we have V.F pages in page layout ?
Answer: Yes.
What are Sobjects ?
Answer: An sObject is any object that can be stored in the Force.com platform database. These are not objects in the sense of instances of Apex classes; rather, they are representations of data that has or will be persisted. sObject is a generic abstract type that corresponds to any persisted object type.
How to create standard object as child to custom object(which is not possible thru standard away process,have to bypass this restriction) ?
Answer: Create Lookup and make the lookup field mandatory.
Detect the current Logging Level in Apex ?
Answer: Unfortunately, I don’t think there is a way to check the current logging level in APEX.
In a visual force page the save should ensure the data to be be stored in current object as well as associated child object ?
Answer: We have to use Database.SavePoint and Database.Rollback for this situation.
What is Map in apex ?
Answer: A map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type: primitive types, collections, sObjects, user-defined types, and built-in Apex types.
What is audit field, what is the purpose of audit field ?
Answer: Created By, Created Date, Last Modified By and Last Modified Date are audit fields. Used to track when the changes are done to the records.
Call Apex class method on the fly (dynamically) ?
Answer: While you can instantiate a class based on its name using the Type system class, you can’t dynamically locate a method and execute it. The best that you can do is to dynamically create an instance of a class that implements an interface and executes one of the methods on the interface.
There’s more information on the Type class and an example in the :
Apex Developer’s Guide
What we need to do for extending the limit of creating only 2 M-D relationships for custom object ?
Answer: Create Lookup and make the lookup field mandatory.
Can we have duplicate Keys in Map ?
Answer: You can’t have duplicate keys in a Map. You can rather create a Map<Key, List>, or if you can, use Guava’s Multimap. And then you can get the java.util.Map using the Multimap#asMap() method.
How to write java script code for save button ?
Answer: We have to create the custom button and in that custom button, we have to write Javascript code.
How many objects we can store in list ?
Answer: You can store only one Object at a time. But you can store as many as records or instance of an object till you don’t hit Salesforce Heap size limit which is 6 MB for Developer Edition. So it will depend on data you are storing in List like how many fields and type of data you want to store in that list.
What are the attributes of apex tag ?
Answer: Attribute tag is used in creating components.
TOP MNC COMPANIES SFDC INTEVIEW QUESTIONS AND ANSWERS:
Salesforce APEX interview questions and answers 2108 :
Most commonly used terms in salesforce:
Interview questions for salesforce developers : http://visualstudiocoading.blogspot.com/2018/03/interview-questions-for-salesforce.html
Scenario based interview questions:
Top 100 salesforce interview questions and answers : http://visualstudiocoading.blogspot.com/2018/03/top-100-salesforce-interview-questions.html
Salesforce latest interview questions and answers: http://visualstudiocoading.blogspot.com/2018/03/salesforce-interview-questions-and.html
Top 50 latest salesforce interview questions and answers:
latest salesforce common interview questions and answers of all companies 2018:
sfdc cirtification course of 7 most common questions 2018:
salesforce interview questions an DML :
salesforce interview questions and ansers latest :
How to do Integration between two different organizations in salesforce Using REST API and REST Web Service and Apex Web Service?:
sfdc interview questions for cognizant 2018 latest:
most asked salesforce interview questions and answers on all topics 2018:
TCSmost asked interview questions and answers OF SALESFORCE :
http://visualstudiocoading.blogspot.com/2018/02/most-asked-interview-questions-in-tcs.htmlsalesforce
LIGHTNING AND VISUAL FORCE interview questions and answers :
salesforce interview question in Capgemini,Accenture,TCS and american expressin 2018:
0 Comments