- Decide the correct Mapping File: In order to start any new migration from the legacy system to New Salesforce System, we must decide the mapping file correctly. 70% works done if we can finalize the mapping file correctly.
- Identify the ordering of insertion of objects: When inserting the records into the new system, it is extremely important to identify the ordering of insertion of objects into Salesforce. As a trivial example, you will need to insert all the accounts first, and then all the contacts so that relationships between contacts and accounts are set up properly.
- Enable "Create Audit Fields: Typically CreatedBy, CreatedDate, LastModifiedByID, LastModifiedDate are read-only fields. However, during data migrations, it is generally desirable to insert records with legacy dates and ids to match the source system. In order to do this, we must have “Set Audit Fields” permission along with Modify All permission. Setup -> Customize -> User Interface -> Enable "Set Audit Fields upon Record Creation" and "Update Records with Inactive Owners" User Permissions
- Time Zone Setting: When inserting date fields, the Salesforce data loader uses the time zone of the user inserting records. The user id is used to insert records that should have “proper” time-zone settings.
- Publish Cut-over plan of Data Migration: It is important to plan out the data migration. The users should be informed well in advance about the cut-off date, and possible issues that may happen. Also, it is always a good idea to have a few pilot users available to test over the weekend in which a major data migration is planned.
- Sanity Check: It is also import to do sanity testing directly in Salesforce. Login as different types of users, and view a few records of different objects. Compare these same records manually with the original system. Although many tools are available, there is no replacement to manual verification when testing data migration.
Cloud computing technology gives users access to storage, files, software, and servers through their internet-connected devices: computers, smartphones, tablets, and wearables. Cloud computing providers store and process data in a location that's separate from end-users.
About Me
Monday, May 2, 2016
Data Migration Consideration
Saturday, March 12, 2016
Schedule the APEX Data Loader
- Create the .bat file
- Schedule a Batch File to run automatically
Tuesday, February 2, 2016
Territory Management
- Territory management is an account sharing system that grants access to accounts based on the characteristics of the accounts.
- Particularly if your organization has a private sharing model, you may need to grant users access to accounts based on criteria such as postal code, industry, revenue, or a custom field that is relevant to your business.
- You may also need to generate forecasts for these diverse categories of accounts. Territory management solves these business needs and provides a powerful solution for structuring your users, accounts, and their associated contacts, opportunities, and cases.
- The ability to use account criteria to expand a private sharing model.
- Support for complex and frequently changed sales organization structures.
- Support for transferring users between territories, with the option to retain opportunities.
- Multiple forecasts per user, based on territory membership.
- Territory-based sales reports.
- Collection of accounts and users where the users have at least read access to the accounts, regardless of who owns the account.
- By configuring territory settings, users in a territory can be granted read, read/write, or owner-like access (that is, the ability to view, edit, transfer, and delete records) to the accounts in that territory. Both accounts and users can exist in multiple territories. You can manually add accounts to territories, or you can define account assignment rules that assign accounts to territories for you.
- Territories exist in a hierarchy which you can set up with as many nested levels as you wish. For example, you could create a top-level territory named “Worldwide Sales” that has the child territories “North America,” “Europe/Middle East,” “Latin America,” “Africa,” and “Asia/Australia.” “North America” might have the child territories “Canada” and “United States.“ “United States” might have the child territories “Western,” “Central,” “Southern,” and “Eastern.” Finally, “Western” might have the child territories “California,” “Oregon,” “Washington,” “Nevada,” “Arizona,” and “Utah.”
- Territory hierarchies do not have to be focused on geography; they can be defined however you like.
- When you enable territory management for your organization, the territory hierarchy also becomes the forecast hierarchy
- Your forecast data is derived from the opportunities that are associated with the accounts in your territories. Users have a different forecast for each territory to which they are assigned. For example, if you are assigned to both “California” and “Arizona,” you have a separate forecast for the opportunities you have in each of these territories.
Wednesday, January 27, 2016
Agile
The agile development model is also a type of Incremental model. Agile Methods break the product into small incremental
builds. These builds are provided in iterations. Each iteration typically lasts
from about one to three weeks. Every iteration involves cross-functional teams
working simultaneously on various areas like planning, requirements analysis,
design, coding, unit testing, and acceptance testing.
Here’s a quick glance at waterfall practices.
Everything is planned upfront.
Requirements are collected in detail before implementation.
Each step must be completed before moving on.
The outcome is determined at the beginning.
Plan vs Adapt
I got a good example from the salesforce trailhead and let me highlight here. If you’re trying to decide which process works best for you, consider this: If you’re painting a picture, and you’ve decided your colors, your setting, how much time you will spend painting, and what your final image will look like, then you’ve made little room to make changes along the way. That's not to say the picture won’t be a Picasso, but your process isn’t set-up to incorporate new ideas or feedback that can change the final image (for the better, of course). That’s when you might use a waterfall approach.
But when you paint iteratively, you can expect to make changes based on early feedback, new ideas, or even new learnings (those colors clash!) rather than painting in a planned, incremental, order. That’s a more agile approach.
Here’s a visual of those two painting processes:
Advantages of the Agile model
- Customer satisfaction by early and continuous delivery of valuable software
- Welcome changing requirements, even in late development
- Working software is delivered frequently (weeks rather than months)
- Close, daily cooperation between business people and developers
- Projects are built around motivated individuals, who should be trusted
Disadvantages of the Agile model
- There is a lack of emphasis on necessary designing and documentation.
- In the case of some software deliverables, especially the large ones, it is difficult to assess the effort required at the beginning of the software development life cycle.
Definition of Scrum
The Scrum Team:
Scrum Master
Salesforce ScrumMasters:
Remove blockers
Don’t micromanage
Steer the team from bad habits and inefficient processes
Enable the team to become collaborative and high-performing
Product owner
At Salesforce, the product owner:
Facilitates communication among stakeholders, team members, and the ScrumMaster.
Defines, prioritizes, and approves work for the team.
Works with customers to define desired features.
Scrum Team
At Salesforce, teams are:
Self-organizing and empowered
Consistently adjusting and updating their process and products based on lessons they’ve learned
Autonomous
Accountable individually
Collaborating on commitments for each sprint
Sprint
Story point
Velocity:
- At the end of each iteration, the team adds up effort estimates associated with user stories that were completed during that iteration. This total is called velocity.
- Velocity is the delivery capacity of the team per sprint. Typically expressed in Story points(effort to complete the story).
- Velocity is a powerful method by which we can measure the rate at which scrum development teams consistently deliver business value. Velocity is the sum of the estimates of delivered features per iteration. "Worked example:" an agile team has started work on an iteration, planning to complete stories A and B, estimated at 2 points each, and story C, estimated at 3 points. At the end of the iteration, stories A and B are 100% complete but C is only 80% complete.
How do I estimate future iterations?
Product Backlog:
It’s constantly refined as teams learn new information about the product.
Higher-priority items have more detail in them so that they’re work-ready.
It includes not just project-related work, but also support or maintenance work, non-functional requirements, and research.
The product owner owns it, and it’s their job to prioritize the work items.
Sprint Backlog
- All work committed to and pushed into a Development Teams's upcoming Sprint/iteration as chosen by the Development Team in their Sprint Planning meeting.
- Sprint Backlog is the subset of the Product Backlog.
Definition of Done (DoD)
Here’s a scenario to consider: Imagine there’s a new piece of product functionality that you need to create. You assign this new task to your team and ask them to implement it this month. They do it, and move on. Fast-forward a few months, and the finished work item resurfaces with new problems. Perhaps there are customer complaints because integrations were not fully tested. Maybe security issues were not addressed, or performance was not up to par. The conclusion: The work item wasn’t actually finished, at least not enough to deploy.
Our definition of done is a set of guidelines that dictates everything a team is required to do before they can call the work truly done. Creating a standard for this is critical to upholding one of our core Salesforce values: trust.
- DoD is a subject not object means Team define the DoD.
- DoD is defined by mutual agreement within the team.
- the Definition of Done provides a checklist which usefully guides pre-implementation activities: discussion, estimation, designhaving an explicit contract limits the risk of misunderstanding and conflict between the development team and the customer or product owner
- the Definition of Done limits the cost of rework once a feature has been accepted as "done"
Implement Scrum
There are two main types of Scrum meetings at Salesforce.
Planning meetings: These happen at all different stages of the project—drawing it out, it looks like a layered cake. Regardless of what stage the project is in, teams regularly meet to ensure they’re aligned on the final outcome.
Inspect and adapt meetings: We’ve talked a lot about how important it is for teams to take new learnings and apply them to the next sprint. This is the time they do this. These meetings are geared toward improving the process and the products.
Planning Meetings
Agile teams then use this to continue their planning.
Release Planning Every 4 Months
We release new versions of our core platform every 4 months—and there are smaller updates even more frequently with other products. And we deploy infrastructure releases as needed. At the beginning of every major release cycle, we have a high-level planning meeting to create a roadmap for each cloud.
Key purposes of these meeting:
- Provide a high-level understanding of new features and functionality.
- Negotiate schedules and set expectations for delivery.
- Align on business and customer priorities.
- The next step in the planning process is to prepare for the upcoming sprint. Teams plan a couple of sprints ahead, where they review their product backlog to make sure the highest-priority items are ready to be worked on.
- What’s the purpose of these meetings? The team provides input and gets clarity on what is coming down the pipe.
- Work is broken into smaller chunks.
- Conditions of satisfaction are drafted, which help clarify desired outcomes.
- Identify work that is not ready for prime time.
- Before the sprint starts, teams get together to create a roadmap of what they intend to accomplish over the next 2 weeks. During this meeting, the team agrees and commits to a work plan.
- Usually, at these meetings, the teams start with the product backlog, looking at what projects are at the top of the list and decide which they can commit to now.
- Although Scrum calls for daily stand-up meetings, most teams exercise the no-interruption Thursday rule, which is exactly what it sounds like: no meeting on Thursdays.
- What does it look like?
- It’s a very brief sync where team members make sure they are all focused on the right objectives for the day—and offer help where needed.
- The frequency is meant to prevent team members from spinning their wheels and bottlenecking progress.
- It provides visibility on daily progress.
Inspect and Adapt Meetings
Retrospective: A Look Back at the End of Every Sprint
- This is the meeting where the team can take responsibility for their progress or failures.
- Each sprint, the team spends a little time analyzing how well they worked or didn’t work. They focus on two things during this review period: process and the team.
- At this time, the team inspects how they worked during that sprint, and then decides what to change and adapt for the next sprint. The ultimate goal is to improve the process and the deliverable every sprint.
- It is expected for a team to have a couple of “actionable experiments” after each sprint—something new they can try in the next sprint. These new action items are added to their sprint or Kanban boards, and one person holds the team accountable to those.
- Sprint Demo Happens Each Sprint
- During the second of the two inspect and adapt meetings, the team presents finished work to product owners and stakeholders to get feedback and input. They inspect their deliverables, and take what they learned and adapt it to their process moving forward.
- Without these meetings, the team misses out on the opportunity to improve.
Scrum Vs Kanban
Scrum Case Study
Imagine if your team has to create a new website. The team can break down the work into the smaller projects. As the smaller work items are completed, the team can review their progress each sprint and adjust to ensure the whole project is delivered successfully. If the project needs a predictable delivery schedule, Scrum is the preferred workflow to use.
Kanban Case Study
Does your team have to deal with service outages? That’s an example of interruption-driven work. You can’t always know about or plan for outages 2 weeks in advance. Teams that work on architectural, service, or platform support tend to work on items that just pop up and create shifting priorities.
Wednesday, January 20, 2016
Triggers
- Insert
- Update
- Delete
- Undelete
- Upsert
- Merge
Types of triggers
- Before-trigger events occur before a record’s changes are committed to the database.
- This particular event is ideal for performing data validation, setting default values, or performing additional logic and/or calculations.
- After-trigger events occur after a record has been committed to the database, which means that records being inserted will have a record id available.
- This particular event is ideal for working with data that is external to the record itself such as referenced objects or creating records based on information from the triggered object. Suppose need to insert the contact whenever an Account is inserted.
- A better name for this flag might be "isCreatedByTrigger".Returns true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service, or an executeanonymous() API call.When decoupling the Apex trigger handler class from the actual trigger, the Apex class has no way to know what context it's called in (unit test, web service, visualforce page, trigger). This flag just means the handler was executed by a trigger.
- Returns true if this trigger was fired due to an insert operation, from the Salesforce user interface, Apex, or the API.
- Returns true if this trigger was fired due to an update operation, from the Salesforce user interface, Apex, or the API.
- Returns true if this trigger was fired due to a delete operation, from the Salesforce user interface, Apex, or the API.
- Returns true if this trigger was fired before any record was saved.
- Returns true if this trigger was fired after all records were saved.
- Returns a list of the new versions of the sObject records. Note that this sObject list is only available in insert and update triggers, and the records can only be modified in before triggers.
- Returns a list of the old versions of the sObject records. Note that this sObject list is only available in update and delete triggers.
- A map of IDs to the new versions of the sObject records.
- A map of IDs to the old versions of the sObject records.
- We cannot write the trigger on object where istriggerable is false like AccountContractRole
- Try to write one trigger on one object
- Use handler class to write the logic
- Use context variable to filter the records
- Use Map and Set in the trigger
- Minimize the number of SOQL statements by preprocessing records and generating sets, which can be placed in single SOQL statement used with the IN clause.
- Minimize the number of data manipulation language (DML) operations by adding records to collections and performing DML operations against these collection
Monday, January 18, 2016
What is CRM?
CRM Model is used to manage the organization's interactions
- Phone calls
- Emails
- Meetings
- Social Media
- Increase in Sales revenue
- Increase visibility between departments
- Decrease operating costs.
- Streamline business process
Wednesday, January 13, 2016
Salsforce API
REST API
- Force.com REST API lets you integrate with the force.com applications using simple HTTP methods.
- The request/response would be in the form of xml or JSON.
- Useful in light weighted application like mobile application
- Click for more detail
SOAP API
- SOAP API works on SOAP (WSDL) protocol.
- The request/response would be in the form of xml.
- We can use SOAP API to integrate Salesforce with your organization’s ERP and finance systems.
- Click for more detail
Tooling API
- As the name itself suggests, use tooling API to build custom development tools for Force.com applications.
- You can get the code coverage information with the help of Tooling API.
Streaming API
- Use Streaming API to receive notifications for changes to data that match a SOQL query that you define.
- Streaming API is useful when you want notifications to be pushed from the server to the client.
- Streaming API enables you to reduce the number of API calls and improve performance.
- Click for more detail
Chatter REST API
- Access Chatter feeds and social data such as users, groups, followers, and files using REST.
- Click for more detail
Bulk API
- Bulk API is based on REST principles and is optimized for loading or deleting large sets of data.
- You can use it to query, insert, update, upsert, or delete many records asynchronously by submitting batches. Salesforce processes batches in the background.
- SOAP API, in contrast, is optimized for real-time client applications that update a few records at a time. SOAP API can be used for processing many records, but when the data sets contain hundreds of thousands of records, SOAP API is less practical. Bulk API is designed to make it simple to process data from a few thousand to millions of records.
- The easiest way to use Bulk API is to enable it for processing records in Data Loader using CSV files. Using Data Loader avoids the need to write your own client application.
- Click for more details
Metadata API
- Use Metadata API to retrieve, deploy, create, update, or delete customization for your organization.
- The most common use is to migrate changes from a sandbox or testing organization to your production environment.
- Metadata API is intended for managing customization and for building tools that can manage the metadata model, not the data itself. Like The Force.com Migration Tool, Force.com IDE
- Click for more detail
Apex REST API
- Use Apex REST API when you want to expose your Apex classes and methods so that external applications can access your code through REST architecture.
- Apex REST API supports both OAuth 2.0 and Session ID for authorization.
- You can also read this article for the detailed information
- Use Apex SOAP API when you want to expose Apex methods as SOAP Web service APIs so that external applications can access your code through SOAP.
- Click for more detail
Tuesday, January 12, 2016
Skinny Tables
- A skinny table is a custom table in the Force.com platform that contains a subset of fields from a standard or custom base Salesforce object.
- To enable skinny tables, contact salesforce.com Customer Support.
- The storage consumed by a skinny table does not count toward your org's storage.
- Skinny tables do not expire, and are automatically updated by the system as data is uploaded.
- Skinny tables are created by our DB Performance Engineering team upon analyzing each specific case, if it would improve the performance of reports, list views, or SOQL queries.
- A skinny table is a custom table in the Force.com platform that contains a subset of fields from a standard or custom base Salesforce object. By having narrower rows and less data to scan than the base Salesforce object, skinny tables allow Force.com to return more rows per database fetch, increasing throughput when reading from a large object, as this diagram shows.
- Skinny tables do not include soft-deleted rows (i.e., records in the Recycle Bin with isDeleted = true), which could also reduce the table volume in some cases.
- The Force.com platform automatically synchronizes the rows between the base object and the skinny table, so the data is always kept current
- They don’t have the dynamic metadata flexibility you find in the base object. If you alter a field type (e.g., change a number field to a text field) the skinny table becomes invalid, and you must contact salesforce.com Customer Support to create a new skinny table.
- Skinny tables can contain a maximum of 100 columns.
- Although data for existing fields in the Skinny table are automatically updated, the skinny table will need to be recreated if a new field has been created.
- They cannot be created on Activities
- There's nothing visible to the customer when a skinny table exists. It's entirely transparent.
View State
- View State is useful to maintained the state during Post Backs.
- As we know GET and Post Request works on HTTP protocol and http protocol is stateless protocol, which means every request and response is treated as independent request for the page. So there should be some mechanism which can be used to mention the state so that we can have the required information for processing the page. View State is the mechanism to maintained the state
- Suppose we input some value in the VF page and submit the result, If any custom validation runs and throw the error to the VF page, the view state mention the old values that we have filled earlier.
In this way, View state makes your job as a developer easier by automatically managing state during post-back. However as we know Salesforce is based on multi-tenant environment where more than one user works at a time so it is required to use the View state within the limit. 135 KB is the limit of View State.
Steps to avoid the View State
- Minimize Number of Forms on a Page
- Declare variables as Transient if possible.
- Use Custom Settings to Store Large Quantities of Read-Only Data
- Declare variable as Static, as it is not saved in View State.
- Refine your SOQL to only retrieve the data needed by the page.
- Refactor Your Pages to Make Its View Stateless: (Instead of using apex:commandLink or apex:commandButton components (which need to be inside a apex:form component) to invoke an action, use an apex:outputLink)
- If you want to manage your own state, instead of using <apex:form> use HTML <form> tag instead.
Monday, January 11, 2016
Action Components in VF Page
- apex:actionSupport
- apex:actionStatus
- apex:actionRegion
- apex:actionPoller
- apex:actionFunction
- As name itself suggested, actionSupport provide the support to action of the other component.
- Provides support for invoking controller action methods from other Visualforce components.
- Displays the status of an AJAX update request.
- An AJAX request can either be in progress or complete.
- When some operation is happening in the back ground then it will show processing message to the user so that she/he can wait.
- Refer the above example
- actionRegion provides an area of a Visualforce page that decides and separates which components should be processed by the force.com server when an AJAX request is generated.
- Only the components which are inside actionregion component are processed by server, so it increases visualforce page performance.
- Refer http://www.sfdcpoint.com/salesforce/actionregion-visualforce-salesforce/ blog for the more details
- A timer that sends an AJAX update request to the server according to a time interval that you specify
- Used to call the action method of the controller from the JavaScript
- An <apex:actionFunction> component must be a child of an <apex:form> component.
Grid in VF page
- apex:dataTable
- apex:dataList
- apex:pageBlockTable
- apex:repeat
- It should be inside of <apex:pageblock> or <apex:pageblocksection>
- <apex:pageblocktable> has a required attribute called "value"
- It uses the standard salesforce page styles
- column headers will be displayed automatically
- no need to write inside <apex:pageblock> or <apex:pageblocksection>
- there is no required value
- data can be displayed using custom styles
- we need to specify column headers explicitly
- there is no proper alignment of data in repeat as compared with datatable
- there is no javascript events like onmouseover,onclick.
- simply data displayed in irregular format
- An ordered or unordered list of values that is defined by iterating over a set of data.
- It support js event onclick , ondblclick etc
Saturday, January 9, 2016
Licenses Overview
- User License
- Permission Set License
- Feature License
- Usage based entitlement