Tuesday, December 6, 2016

Interview questions - Salesforce Developer - Part 1

1. Difference between Roles and Profiles
Roles, primarily control a user's record-level access permissions through role hierarchy and sharing rules.
Profiles, sets control a user's object- and field-level access permissions

2. Did you faced any situation where circular trigger take place, what's the error? And how did you avoid it?

A recursive trigger is one that performs an action, such as an update or insert, which invokes itself owing to,  say something like an update it performs.
eg in a before trigger, if you select some records and update them, the trigger will invoke itself.
To avoid, static variable 'locks' are used. Illustrated in the salesforce doc

"Static variables are only static within the scope of the request. They are not static across the server, or across the entire organization.
Use static variables to store information that is shared within the confines of the class. All instances of the same class share a single copy of the static variables. For example, all triggers that are spawned by the same request can communicate with each other by viewing and updating static variables in a related class. A recursive trigger might use the value of a class variable to determine when to exit the recursion."

https://help.salesforce.com/HTViewSolution?id=000133752&language=en_US

3.Rest vs SOAP API calls
REST API has a lightweight request and response framework and is easy to use, it’s great for writing mobile and web apps. Supports CRUD. supports both XML and JSON.

SOAP API uses the WSDL file as a formal contract between the API and consumer, it’s great for writing server-to-server integrations.

4. How to create a WSDL contract? In what case is it useful? Can we go without creating it?

5. What is action function in context of visual force?
https://developer.salesforce.com/docs/atlas.en-us.204.0.pages.meta/pages/pages_compref_actionFunction.htm

6. Batchable interface - What type of records are returned in case of execute function?

7. Governor limits -

8. Scenario - What happens when insert and update trigger on User object

Wednesday, February 10, 2016

Git every day commands

A normal GIT workflow of a developer is:
1. Pull the changes on git
git pull

2. Check if any of this files are changes.
git status

3. If merger error is there, manually merge it.
4. Add your changes to Git
git add -A or git add filename

5. Commit the changes
git commit -m "Message for commit"

6. Push the changes.
git push

For details please follow this cheat sheet: https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf