Custom field data types in Salesforce CRM

November 12, 2011

When creating a custom field in Salesforce, the first step is to select the appropriate data type for the field. There are many different field types which allow the storage of records of various data values such as numbers, dates, percentages, and so on. The following picture shows some of the fields and the rest of the blog describes the field types that are available.

Salesforce CRM Field Types

Auto Number
An Auto Number field produces a unique number that is automatically incremented for each saved record. As such this is a read-only field where the maximum length is 30 characters of which 20 are reserved for further prefix or suffix text that you can specify.

Checkbox
A Checkbox allow your users to set or unset a value to mark the attribute as either true or false.

Currency
Salesforce provides a Currency field to specifically capture a money value. Here the Salesforce CRM application applies currency-related codes which are applied when working with that field record.

Date
The Date field provides a way for your users to either pick a date from a pop-up calendar or to manually key the date. Your users can also enter the current date clicking on the date link positioned to the right of the field.

Date/Time
The Date/Time field provides a way for your users to either pick a date from a pop-up calendar or to manually key the date and the time of day. Your users can also enter the current date and time by clicking on the date and time link positioned to the right of the field. Here, the time of day includes A.M. or P.M. notation.

Email
Email fields provide the facility to store an individual’s email address. The Salesforce CRM application provides a very robust method of verifying the correct format of e-mail addresses before they are allowed to be saved.

Formula
Formula fields provide a method to automatically calculate a value which is calculated from other fields or values stored within Salesforce CRM.

Hierarchical relationship
This field type forms a hierarchical lookup relationship between relevant objects. For the user hierarchical relationship, users can use a lookup field to associate one user with another For example, you can create a custom hierarchical relationship field to store each user’s direct manager.

Lookup relationship
The lookup relationship field creates a relationship between two records so you can associate them with each other. For example, opportunities have a lookup relationship with cases that enable you to associate a specific case with an opportunity.  A lookup relationship has no effect on record deletion or security, plus the lookup field is not required in the object page layout.

Master-detail relationship
Creates a parent-child type relationship between records where the master record controls certain behaviors of the detail record such as security and record deletion.  Master-detail relationship fields can only be created on custom objects that relate to a standard object and not the other way. If the Master record is deleted then all detail records are also deleted. You can create up to two Master-detail relationship fields per custom object.

Number
The Number data type can be used to enter any number with or without a decimal place (the number of decimal places can be specified) and saved as a real number with any leading zeros removed.

Percent
With Percent fields in Salesforce CRM, a percentage sign is automatically appended to the entered number. Fields values lose precision after 15 decimal places. If the decimal value is greater than 15 and a percent sign is added to the number, a runtime error occurs.

Phone
The Phone field allows the users in your organization to enter any telephone number.

Picklist
The Picklist field allows users to choose a value from a set of pre-defined text values. The maximum length of the text values is 255 characters.

Picklist (Multi-select)
The Picklist (Multi-select) field allows users to choose more than one picklist value from a set of pre-defined text values. When saving and viewing, the data is stored as text along with semi-colons which are used to separate the individual picklist values.

Roll-Up Summary
A Roll-up Summary field (or RUS) is used to automatically display the summarized values of the related records. This can be a record count of related records or a calculation of the sum, minimum, or maximum value of the related records.

Text
The Text field allows users to enter any combination of alphanumeric characters. The maximum length of the text value is 255 characters.

Text (Encrypted)
The Text (Encrypted) field allows users to enter any combination of alphanumeric characters. The text is then stored in an encrypted form (this data type is available by request to Salesforce support). The maximum length of the text value is 255 characters. Encrypted fields are encrypted with 128-bit master keys and use the AES (Advanced Encryption Standard) algorithm.

Text Area
The Text Area field allows users to enter alphanumeric characters on separate lines. The maximum length of the text value is 255 characters and a warning is displayed when the number is about to be reached (as shown in the screenshot above).

Text Area (Long)
The Text Area (Long) provides for the storage of up to 32,000 characters that display on separate lines similar to a Text Area field. However you can specify a lower maximum length of this field type from between 256 and 32,000 characters. This data type is not available for activities or products on opportunities. Only the first 254 characters in a rich-text area or a long-text area is displayed in a report.

Text Area (Rich)
Using the Text Area (Rich) data type your users are provided with text field with an embedded toolbar.  This toolbar allows for the simple formatting the text and provides for the adding of images and URL web links.

URL
The URL field allows users to enter a web link. When the web link is clicked the Salesforce CRM application opens a new browser window to show the web page.

Reference: Salesforce CRM: The Definitive Admin Handbook book and eBook

Salesforce CRM: The Definitive Admin HandbookPackt Publishing

http://www.packtpub.com/salesforce-crm-definitive-admin-setup-configuration-customization-handbook/book

Amazon

http://www.amazon.com/Salesforce-CRM-Definitive-Admin-Handbook/dp/1849683069/ref=sr_1_1?ie=UTF8&qid=1321101181


Delegating User Management in salesforce.com

March 19, 2011

Delegating User Management in salesforce.com

If you are a system administrator of a Salesforce org you are likely to be highly skilled at multitasking as often you are expected to carry out several tasks at once.
 
One such task that you can spend a significant amount of time and effort on is the setting up and managing of  users in the system and this is especially so with an org that has a large number of users or a complex role hierarchy.

The good news is you can delegate aspects of user administration to users who are not assigned with the system administrator profile to allow you to focus on tasks other than managing users for every department or structure that your company has within Salesforce.

Not only will his save you time and effort but this provides further benefits for global organizations with time zone and cultural differences as it allows a user based in that region with local knowledge to create the users which also saves time and provides a better user experience.
For example, you may want to allow the manager of the Asia Pacific Operations team to create and edit users in the Asia Pacific Operations Team Leader role and all subordinate roles.

There are currently two ways of setting this kind of delegated user management access:

  • Create a profile with the Manage Users permission
  • Use delegated administration

Create a profile with the Manage Users permission
This option is not recommended and should be very carefully considered as it allows a much greater range of system administration functions to be carried out by the user. 
In addition to creating and managing users the Manage Users permission also allows the user: to expire all passwords; to clone, edit or delete profiles,  to edit or delete sharing settings; to edit user login hours and a great deal more. 
Not only are these non-user administration tasks allowed for users with the Manage Users permission but it is also not possible to restrict the types of profiles that can be selected when creating new users so there are several security risks with this option.  For example the Manage User permission would allow someone to create users with the system administration permission.

Use delegated administration
Delegated administration is a more secure method for providing delegated user management access as it allows you to assign limited administrative privileges to the selected non-administrator users in your organization.
Delegated administrators can perform the following tasks: creating and editing users and resetting passwords for users in specified roles and all subordinate roles; assigning users to specified profiles; logging in as a user who has granted login access to their administrator.
To create delegated groups, follow the path Your Name | Setup | (Administration Setup)  | Security Controls | Delegated Administration.  Now click on the  New button or select the name of an existing delegated administration group. 

Manage Delegated Groups

Manage Delegated Groups

Here we look at the existing group that has been named “User Management”.

Delegated Group - User Management Example

Delegated Group - User Management Example

The Delegated Administrators section allows you to select and add the users that are to be given the delegated administration permission.
The User Administration section allows you to select and add roles which the delegated administrators can assign to the users they create and edit.  They can assign users for the stated roles and all subordinated roles.
The Assignable Profiles section allows you to select and and add profiles which the delegated administrators can assign to the users they create and edit.
For security profiles with the “Modify All Data” permission cannot be included to be assigned by delegated administrators.  See the following error when attempting to include the System Administrator profile.

Assignable Profiles - System Administrator Error

Assignable Profiles - System Administrator Error

Select Enable Group for Login Access if you want to allow delegated administrators in this group to log in as users who have granted login access to their administrators and are in the roles selected for the delegated administrator group.

And there you have it. 

Using the delegated administration feature takes a little effort to understand and to be comfortable with its setup but it is so much more secure and will prevent any unexpected side effects which might happen with the simple granting of the Manage Users permission. 

With so many things in life prevention is often better than cure this feature should leave everyone feeling happy!


CRM History – salesforce.com CRM

December 5, 2010

Yesterday I posted a tweet linking to an interactive timeline from softwareadvice.com showing the history of CRM software.

http://twitter.com/SetupForce/status/11040861248823296

CRM Software History

I think the timeline is a nice piece of work but it got me thinking how the graphics and description for salesforce.com CRM, milestoned in 1999, needed a little more detail (and a lot more appreciation for how it has evolved).

Back then there were anouncements like the one reported by InformationWeek on Monday, December 6, 1999 as

“… Salesforce.com Inc. today will introduce a CRM service that strips sales-force automation down to a Web site that provides front-office functions…”

“The 6-month-old startup, … will aim the service at companies with 10 to 200 salespeople. It will offer features found in traditional sales-force automation tools, including account management, contact management, opportunity management, forecasting, and reports. But unlike traditional packages, the service requires no implementation or maintenance by the customer.”

http://web.archive.org/web/20000302220511/www.informationweek.com/story/IWK19991206S0002

And the graphics back then looked more like:

Salesforce 1999

I wonder how many of the 27,000 salesforce community, attending Dreamforce 2010 this week, equate their use of salesforce.com with this target user base and feature list!


Final weekend to maintain your salesforce.com certification – spooky!

October 31, 2010

The salesforce.com Winter ’11 certifications are to be made available next week.

Details for the Winter ’11 Release Training can be found here

http://www.salesforce.com/customer-resources/learning-center/details/release-training.jsp

Final Weekend for passing salesforce.com Spring '10 certification

All certified professionals must pass the release maintenance exams three times per year and if you have missed two consecutive maintenance exams your credentials will expire. Noooooooooooo!

With the availability of the Winter ’11 certifications on Monday November 1st 2010 this is the final frightful weekend to pass the Spring ’10 certification otherwise you may be at risk of losing your credential.

 You must also have passed the Summer ’10 certification to remain fully current in the programme.

salesforce.com Certification Expiration Warning


salesforce.com Chatter at Cloudforce London 2010

September 18, 2010

Cloudforce London 2010 – 8th September 2010 at Royal Festival Hall

During Cloudforce London 2010 I attended Marc Benioff’s keynote session where the theme was “Chatter”. Benioff was saying how he wished all enterprise software could be more like Facebook – it seems salesforce is positioning Chatter as some kind of “Facebook for the enterprise”.  He also announced Chatter Mobile which is supported on iPhone, iPad and BlackBerry (and later Android) and some of the demos below were done using these mobile devices.
 
Chatter ScreenChatter allows salesforce.com users to track data as well as people within their organisation – users can monitor information flow, for example open support cases, opportunity updates, price list changes as well as updated documents such as slide decks, account plans etc. 

Benioff said that he regularly taps into various information flows and uses it as an early warning sign and indicator of good performance or areas of concern.  A demo was given showing quick and easy real-time communication and collaboration and was compared to current enterprise collaboration, which rely heavily on email, embedded files and/or web links. Benioff said that it had reduced email usage, claiming a reduction of 40% within salesforce and also claimed that it has improved structured file sharing and versioning far better than say SharePoint.
 
Benioff went on to say that outside an organisation, when trying to find information about a product or solve a problem, today, most often people use google, twitter, facebook etc instead of contacting a company directly.  There was a demo showing how Chatter can also now monitor conversations happening in the outside world so that salesforce users who need to see what people are saying outside the organisation can do that alongside their internal Chatter conversations. A demo showed a twitter poster, as an example requesting customer support information.  The feed was received in salesforce by the customer support team, a knowledge base was referred to, and the answer posted back out via Twitter in real-time.  It seems that salesforce is still expanding this functionality by linking with Seesmic.  (Seesmic aggregates more than 40 social networks and geolocation applications and it was announced that it now aggregates Chatter too).
 
What was interesting is that Benioff claimed that nearly 25% of their current customer base (83,000 customers) has adopted Chatter within the past few months.  Also, in the Winter ’11 salesforce.com release, Chatter is to be switched on by default (which is unusual as you normally have to opt-in for such major features in new releases).

By the way if you are a customer and do not want Chatter auto enabled you can use the following online form. https://www.salesforce.com/form/contact/chatter.jsp
 
I began to look at Chatter last year as part of a developer beta and to be honest I was a bit sceptical – it seemed merely an attempt by Salesforce to extend the user base – by enabling collaboration within a company and thus requiring extra licenses in addition to the CRM teams. 

However the demos were impressive and the whole concept seems far more compelling.  Chatter is now free to current users and salesforce provide a Chatter-only license model to allow non CRM users to collaborate. (although there may be limits to what not CRM users can access as I believe only account and contacts are included ; opportunities may not)


Salesforce Quick Reference & Tip Sheets

June 3, 2010

I often have mixed emotions when starting work for any existing salesforce.com client and finally getting to see their established org for the first time. 

Often there are some really great design and innovative ideas in which the platform has been extended (which is great) but just as often I find myself puzzling why some things have been done (not so great).

One of the “not so greats” is the creation of custom fields to store data where there is already a perfectly adequate standard field.  For example “SIC Code”; “Annual Revenue”; “Industry” etc are all standard fields on the Account object.

Salesforce’s ease of field creation can create issues if some simple governance is not applied.

Fortunately salesforce has many great resources to help prevent this; here is a field names quick reference which list all the standard fields by object in a really neat PDF document.

https://na7.salesforce.com/help/doc/en/salesforce_field_names_reference.pdf

Of course sometimes the standard field name or data type may not be appropriate for the business in which case a new field justifiably needs to be created (but of course there are limits to the number of customisations that can be applied). 

This raises another issue I tend to encounter is understanding the customisation limits associated with a particular salesforce edition. 

In the early days it used to be a bit of a chore tracking these down either from memory, from the online help section or on independent blogs for the related function area but thankfully there is now a single reference PDF document that has the limits listed.  Excellent!

https://na7.salesforce.com/help/doc/en/salesforce_app_limits_cheatsheet.pdf

Finally I have discovered the following very useful page (non salesforce from www.cloud-consulting.nl) which lists many useful tip sheets, documents and quick references.

http://www.cloud-consulting.nl/en/Articles/Whitepapers/salesforcecom-tip-sheets-a-user-guides.html

Paul


Salesforce Schema

January 31, 2010

Salesforce Schema Documentation

Last week I attended the London Salesforce.com user group meeting where I had some very interesting conversations with other Salesforce.com developers and consultants – good to meet you all.

In one conversation I overheard a discussion about the Salesforce documentation and how it was apparently difficult to understand the way that the underlying structure all fitted together. 

Salesforce Sales Objects

Salesforce Sales Objects

I admit I had similar concerns in the past but find that the web services documentation to be absolutely superb in this respect and so passed this on and thought I mention it here too. 

Here is the link to the online documentation Force.com Web Services API Developer’s Guide  where the above diagram shows the sales objects.  To see the structure diagrams navigate to Reference – Data Model. 

What is particularly impressive is how the online documentation is so fresh and up to date.  Well done Salesforce documentation team. 

As an example here is the diagram for the products; you will notice that it includes Quotes which are coming in the Spring ’10 Edition – fantastic!

Salesforce Product Objects

Salesforce Product Objects


Pesky Calendar popup on Visualforce page load.

September 30, 2009

Stopping Calendar Popup on Visualforce page load.

Salesforce.com provides many useful field types from formulas and roll-up summaries to the simple URL field. 

One field that can be a little frustrating or rather the way it is rendered is the date field.

When including a date field on a page the user is automatically presented with a popup calendar whenever focus is placed on the field.

This is useful (hero Salesforce) and avoids the need to click a separate link or image to select from a calandar.

However this automatic display of the popup calendar is not always useful (or wanted). 

For example Whenever the date field is positioned as the first editable field on a page the focus is automatically placed there and the result is an unwanted popup when the page loads (zero salesforce).

 Date field popup calendar
Fortunately when developing a Visualforce page we can prevent the focus from being placed on a field  (and any potential calendar popup) when the page loads with the use of a javascript function.

Simply add the javascript function setFocusOnLoad() {} (just the function with no code) between script tags on the page and no longer do we see the popup calendar when the page loads.

Visualforce page - script setFocusOnLoad()


Salesforce.com Help Screen using Apex and Visualforce to read Setup Information

August 10, 2009

 

Salesforce.com Sales Stages Help Screen

Recently I was asked to change the sales stages configured in a salesforce.com org.

Visualforce PDF Sales Stages

Visualforce PDF Sales Stages

 After the configuration and then the manipulation of historic opportunity data I patted myself on the back, grabbed a coffee and thought job done… right?

Well not quite.. although the new sales stages had been well communicated in advance I hadn’t bargained for the number of sales and marketing users who were totally unaware of the new stages.

I needed to resend my notification email about the planned changes again and again and again…

the org is global with hundreds of users so I thought there had to be a better way.

So I wrote a help screen using Apex and Visualforce to read the actual setup and display the sales stages within Salesforce itself; the beauty being that both the link and the actual information is stored within Salesforce so should the sales stages change in the future the help information will change dynamically.

Having filled out the description of each Sales Stage during the configuration as below:

Stage Stage Description

Stage Stage Description

The APEX class and Visualforce Page was developed

clsHelpSalesStages Apex Class

clsHelpSalesStages Apex Class

public class clsHelpSalesStages
// Controller code for Help Sales Stage VisualForce Page Handler
// PGoodey Aug 2009
// Version 1.0
{
private List<OpportunityStage> opp_sales_stages;
public List<OpportunityStage> getSalesStages()
{
opp_sales_stages = [SELECT MasterLabel, IsClosed, IsWon, ForecastCategory,
ForecastCategoryName, DefaultProbability, Description
FROM OpportunityStage
WHERE IsActive = true
ORDER BY SortOrder ASC];
return opp_sales_stages;
}
public static testMethod void testMyController()
{
clsHelpSalesStages hSs = new clsHelpSalesStages();
List<OpportunityStage> oppStageTest = hSs.getSalesStages();
}
}
  

  

vfpHelpSalesStages Visualforce Page
vfpHelpSalesStages Visualforce Page
<apex:page controller=”clsHelpSalesStages” tabStyle=”Opportunity” renderAs=”pdf” sidebar=”false” >
<apex:form >
<apex:sectionHeader title=”Setupforce: Sales Stages Description. Date: {!NOW()}” />
<apex:pageBlock title=”">
<apex:pageMessages ></apex:pageMessages>
<apex:pageBlockTable value=”{!SalesStages}” var=”s” rendered=”{!NOT(ISNULL(SalesStages))}”>
<apex:column >
<apex:facet name=”header”>Name</apex:facet>
<div style=”background-color:{!CASE(s.ForecastCategoryName,’Closed’,'maroon’, ‘Omitted’,'#FFA07A’,
‘Commit’,'green’, ‘Funnel’, ‘blue’,'gray’ )};
color: {!CASE(s.ForecastCategoryName, ‘Omitted’,'black’, ‘white’)} ” >
{!s.MasterLabel}
</div>
</apex:column>
<apex:column value=”{!s.DefaultProbability}”></apex:column>
<apex:column value=”{!s.Description}”></apex:column>
<apex:column value=”{!s.ForecastCategoryName}”></apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

Code done.  All that was now needed was to add the link to the users’ Home Page with the use of the Custom Links.

Sales Stages Help Added to Custom Links

Sales Stages Help Added to Custom Links

And that’s it – Users click the link at: 

Custom Link - Help Sales Stages

Custom Link - Help Sales Stages

And the following PDF is displayed.

PDF Sales Stages

PDF Sales Stages


Force.com Development Lifecycle Guide

June 23, 2009

Force.com Development Lifecycle Guide

This new guide describes how an IT organisation can build, test and deploy applications using a combination of Web-based and traditional development practices. It’s meant for IT architects, developers, and administrators who want to understand how the development process for a Force.com app is different from the development process of an app on another platform.

It offers a good overview of the stages in the application development lifecycle and covers:

  • Choosing and configuring environments for development, integration, testing, and staging
  • Planning the delivery of multiple applications on different schedules
  • Using development tools such as the Force.com IDE, Force.com Migration Tool, and Data Loader
  • Tracking and synchronizing changes from multiple developers
  • Migrating setup data between environments
  • Deploying to a production organization

Ref:  Salesforce.com 

http://blog.sforce.com/sforce/2009/06/new-book-the-forcecom-development-lifecycle-guide.html


Follow

Get every new post delivered to your Inbox.