Salesforce Mobile Development – Create New User Code

Written by ShamrockCRM on July 26, 2012 – 11:53 am

See below for code on how to implement a Create New User form in HTML5/VisualForce.

I recently released an HTML5/VisualForce Salesforce.com mobile application recently on the AppExchange for managing Salesforce.com adoption named Adoption Manager.  The purpose is to review users that have not logged in for long periods of time and quickly deactivate them.  It also allows the creation of new users, searching of users, and viewing inactive users.

Below is a screenshot of the Create New User form.  I will walk you through the code to implement something similar.

Salesforce.com mobile development new user

To build this, you need a VisualForce page, an APEX class, and a JavaScript component:

VisualForce:

<apex:page showHeader="false" docType="html-5.0" standardStylesheets="false" cache="true" controller="usermanagerController">
    <html>
        <head>
            <title>Adoption Manager</title>
            <link rel="stylesheet" href="{!URLFOR($Resource.usermanager_jQuery, 'jquery.mobile-1.0.1.min.css')}"/>
            <apex:includeScript value="{!URLFOR($Resource.usermanager_jQuery, 'jquery.min.js')}"/>
            <apex:includeScript value="{!URLFOR($Resource.usermanager_jQuery, 'jquery.mobile-1.0.1.min.js')}"/>
            <apex:includeScript value="{!URLFOR($Resource.usermanager)}"/>
            <apex:includeScript value="{!URLFOR($Resource.forcetk)}"/>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;"/>
        </head>
        <body>
            <div data-role="page" data-theme="d" id="newuserpage">
                <div data-role="header">
                    <h1>Create New</h1>
                </div>
                <div data-role="content">
                    <div class="content-primary">
                        <div id="errorMessageNewUserDiv">
                            <span style="color:red;" id="errorMessageNewUser"></span>
                        </div>
                        <div>
                            <span><strong>* All fields are required for user creation</strong></span><br/><br/></div>
                        <form action="javascript:alert('This user has been created');" id="newUserFormForm">
                            <div data-role="fieldcontain">
                                <label for="firstNameForm">First Name:</label>
                                <input type="text" name="firstNameForm" id="firstNameForm" value="" placeholder="First Name" data-mini="true" maxlength="40"/>
                            </div>
                            <div data-role="fieldcontain">
                                <label for="lastNameForm">Last Name:</label>
                                <input type="text" name="lastNameForm" id="lastNameForm" value="" placeholder="Last Name" data-mini="true" maxlength="80"/>
                            </div>
                            <div data-role="fieldcontain">
                                <label for="emailForm">Email (Username):</label>
                                <input type="email" name="emailForm" id="emailForm" value="" placeholder="Email@email.com" data-mini="true" maxlength="80"/>
                            </div>
                            <div data-role="fieldcontain">
                                <label for="userlicenseForm" class="select">User License:</label>
                                <select name="userlicenseForm" id="userlicenseForm" data-mini="true"></select>
                            </div>
                            <div data-role="fieldcontain">
                                <label for="profileForm" class="select">Profile:</label>
                                <select name="profileForm" id="profileForm" data-mini="true"></select>
                            </div>
                            <div data-role="fieldcontain">
                                <label for="roleForm" class="select">Role:</label>
                                <select name="roleForm" id="roleForm" data-mini="true"></select>
                            </div>
                            <div data-role="fieldcontain">
                                <label for="generatePassForm">Generate password and notify user?</label>
                                <select name="generatePassForm" id="generatePassForm" data-role="slider" data-mini="true">
                                    <option value="on">Yes</option>
                                    <option value="off">No</option>
                                </select>
                            </div>
                            <div class="ui-body ui-body-b">
                                <fieldset class="ui-grid-a">
                                    <div class="ui-block-b">
                                        <button type="submit" data-theme="d" data-mini="true">Create</button>
                                    </div>
                                </fieldset>
                            </div>
                        </form>
                    </div>
                </div>
                <div data-role="footer" data-id="foomain" data-position="fixed"></div>
            </div>
        </body>
    </html>
</apex:page>

Notice that the userLicense, Profile, Role dropdown fields are not populated. They will be dynamically populated with JavaScript and using a query in the APEX Controller. Also notice the use of JQuery mobile components (e.g. email form fields, etc.).

Next article will be the APEX controller.

*And let me apologize in advance if any of the code is not the prettiest at the moment. :)


Tags: , , , , , ,
Posted in Force.com User Adoption, HTML5, Salesforce Mobile, Salesforce.com, VisualForce | 1 Comment »

Salesforce.com Certified Developer

Written by ShamrockCRM on July 25, 2012 – 8:04 pm

Salesforce.com Certified Developer

I am now a Salesforce.com Certified Developer.  I took the proctored online test (the one where you use a webcam from home) and after a bit of technical difficulty with the software (make sure to use Internet Explorer, not Chrome to download the file), I completed the test in 31 minutes without studying.  Easy peasy, lemon squeezy.  I have never felt that this certification was really needed to prove someone’s expertise, but I think it is definitely “icing on the cake” for a lot of people.

Want to learn more about Salesforce Certifications?  Visit here.


Tags: , ,
Posted in Salesforce.com Certifications | Comments Off on Salesforce.com Certified Developer

Geolocation in Salesforce Mobile Apps

Written by ShamrockCRM on June 12, 2012 – 12:02 pm

There’s not very often that I am astounded by something VERY cool having to do with SOQL, but here’s a goodie.  Salesforce is providing the capability for mobile apps to search for records in the vicinity of the current mobile user in SOQL.  Take a look at this information:

 

Geolocation

This one might be news to many Force.com developers, but one of the most exciting new features in Summer ’12 (currently in Pilot) is the addition of a Geolocation custom field type. You can now geocode data in Force.com by adding latitude and longitude coordinates using that custom field type. Once the data is geocoded (say in the location__c field), you can then execute a SOQL query like the one below from the mobile application

SELECT caseNumber, location__latitude__s, location__longitude__s FROM Case
WHERE DISTANCE(location__c, GEOLOCATION(&lt;latitude and longitude coordinates of mobile device&gt;), 'mi') &lt;= 10

The above query will return all Case records that are within a 10 mile radius of the mobile device. We’ll be providing additional details and code samples on how to use the new geolocation field type (pilot) in the near future, but hopefully the snippet above demonstrates some of the power of this new feature.


Tags: , , , ,
Posted in Summer 2012 | Comments Off on Geolocation in Salesforce Mobile Apps

Summer 2012 – Salesforce Release

Written by ShamrockCRM on June 4, 2012 – 9:06 pm

Summer 2012

The Salesforce 2012 release is available for most everybody now and it brings some pretty useful features.  Let me provide an overview of my favorites.

Chatter Messenger – I like it, but it is just adding 1 more messenger to my huge list of messengers already open (Gmail, Facebook, Corporate IM, etc.)

Chatter Messenger in GA

Email Threads in Chatter – This is just an example of Chatter advancing as a modern social collaboration tool.  Think Google Docs and the ability to respond to comments from emails or Facebook.

Chatter Email Responses and Threads

Chatter Multi-File Upload – Much needed feature, but let’s hope that document storage limits start dramatically increasing or there might be problems in the near future.

Multi-file Chatter Upload

Advanced Relationship features – The ability to have Master-Detail relationships with the ability to detach a parent after a record is created.  This is really a beautiful thing.

Advanced Relationship Fields Master Detail
Read more »


Tags: ,
Posted in Salesforce.com, Summer 2012 | Comments Off on Summer 2012 – Salesforce Release

Adoption Manager – Free mobile adoption app

Written by ShamrockCRM on June 4, 2012 – 8:08 pm

As a bit of a hobby project, I created a pretty handy mobile application for Salesforce.com Adoption that can be downloaded from the AppExchange that can compliment my other Adoption app that I created.

Instead of buying new licenses when you have a new user, try deactivating users that haven’t logged in within the past 30/60/90/120 days. Why not just deactivate one of the users that you gave an account that has NEVER logged in before?

Adoption Manager allows you quickly to see who hasn’t logged in in the longest time (or never) and deactivate them. It also allows you to reactivate any old user in the system or create a brand new user. Search through the entire database if you do not want to filter through lists and know a specific user to activate/deactivate.

What makes this even better is that this app can be accessed via the browser or your MOBILE browser. iOS/Android apps are coming soon, but this won’t hold you up, because of this mobile optimized app, using OAuth to securely login to Salesforce.com.

Manage your users quickly and more effectively on the go!

View AdoptionMax on the Salesforce.com / Force.com AppExchange here

Salesforce Adoption

Salesforce Adoption

Salesforce Adoption

Download Adoption Manager here


Tags: , , , , , , ,
Posted in Announcements, Force.com User Adoption, User Adoption | Comments Off on Adoption Manager – Free mobile adoption app

Red Hot Chili Peppers at Dreamforce 2012!

Written by ShamrockCRM on June 4, 2012 – 7:08 pm

It is very hard to be Metallica from Dreamforce 2011, but the choice this year comes pretty close.  Red Hot Chili Peppers will be hosting a concert at the Dreamforce Gala this year.  This band defined my youth and I can’t wait to see them live.

I am also looking forward to Tony Robbins, but I don’t understand why the scheduled him for Friday.  This is a tough day for a lot of people, but maybe that’s why…to force them to stick around.

Dreamforce 2012


Tags: ,
Posted in Salesforce.com | Comments Off on Red Hot Chili Peppers at Dreamforce 2012!

Dreamforce 2012

Written by ShamrockCRM on January 9, 2012 – 12:09 am

It seems like a long time from now, considering it is only January, but I can’t wait for this year’s Dreamforce.

Dreamforce 2012 will be from September 18-21 at the typical Moscone Center in San Francisco.  You can register for the early bird price of $699 until the end of January here.

What band can they hire that can possibly top Metallica?


Tags: ,
Posted in Dreamforce | 1 Comment »

Spring 12 Salesforce Release Notes

Written by ShamrockCRM on January 9, 2012 – 12:05 am

Just a quick note, but here is the link to the full Spring 2012 Salesforce release notes.


Tags: , ,
Posted in Spring 2012 | Comments Off on Spring 12 Salesforce Release Notes

Salesforce Spring 2012 Release Features

Written by ShamrockCRM on January 8, 2012 – 6:51 pm

spring 2012 release

Salesforce.com Spring 2012 Release is just around the corner and there are several very interesting and helpful features (e.g. cross object workflow) that should make a lot of people’s lives much easier.  Take a look below for the highlight of Salesforce Spring ’12 features.  There will be much more released later when they come out with the full release notes.

As probably expected, Salesforce is continuing with the social revolution with many new Chatter social enhancements.  First off is Chatter Bookmarks, allowing you to bookmark your favorite, most useful Chatter posts.  Is anyone else envisioning that Salesforce is trying to become the replacement for email?

Chatter bookmarks

 

In addition, Chatter Favorites.  Search for a specific string “medical referrals” and save that Chatter search as a favorite.

Chatter favorites

In every organization, there are social “influencers,” the tech savvy users that post the most, influence other posts, comment a lot and more.  Salesforce has introduced Chatter Influence, which allows you to find the most influential people in your org.

Chatter influencers

 

Chatter Messenger is the GTalk, AIM, MS Communicator of Salesforce, allowing you to instantly communicate with anyone in your Salesforce organization.  I’m not yet sure if this is a benefit or a burden from adding one more IM service.

Chatter Now communicator

Chatter v2.0 will be released in Spring 2012 for the iPad, bringing an all new UI that is easier to use.

iPad Chatter v2.0 Spring 2012

Chatter Smart Search, bringing the most important items to the top and intelligently categorizing them.  Not world changing, but nice to have to organize the sea of information.

Chatter Smart Search

Data.com is making it a lot easier to search for the exact types of contacts and leads that you would like to target with advanced Google-like filters.

Data.com Enhanced Search Strings

Cross object workflows, finally!  This is a long overdue feature that everyone has been waiting for and should reduce the need for APEX Triggers for some very basic scenarios.  I wonder what types of limitations will be placed on this.

Cross object workflows

The drag and drop schema builder (Database.com) will be available and should be a nice visualization / building feature for the backend.

Schema drag and drop builder

Siteforce is making the publishing of dynamic data a lot easier with some of their new features.  I don’t feel that this is a fully fledged, competitive Content Management System yet, but they are certainly trying to get there.

Siteforce dynamic data assistant

Siteforce CMS functionality

Siteforce Web to Object is a much needed feature as well.  Instead of utilizing a tool such as FormAssembly or having to build code that ties into the API’s, Siteforce will allow out of the box building of externally facing web forms.  Outstanding.  I’m not expecting this to be fully featured immediately, but it has true potential!

Siteforce Web to Object Web to X

Radian6, the social monitoring package, is releasing new features that tie in with the Service Cloud to allow monitoring and tracking of Cases generated from the social networks.  This, of course, requires the Radian6 license.

Radian6 for Service Cloud

Social marketing hub

I’m not sure if you heard, but Salesforce has spun off a new product for separate licensing (ugh), Salesforce Analytics Edition, which is focusing more on the BI crowd.  This is adding additional reporting capabilities like below.  This can expand horizons quite a bit with exception reporting and more, but the need for an additional license is saddening.

Analytics Edition Advanced Report Filters

Joint Reporting for Analytics Edition

Reporting Data Buckets

 Email to Case functionality has now been built into the Outlook Edition tool.  Hasn’t this always been there?  Maybe I haven’t kept up enough with the Outlook plugin.

Email to Case Salesforce Outlook Edition

 Salesforce Mobile for Android will now allow for full editing capabilities with Spring 2012 in January 2012.  Finally!

Salesforce Mobile for Android

 Shared Tasks are an interesting new feature, but seem very useful, e.g. Send Holiday card to all Florida contacts.  Why create 100 tasks when you can create 1.

Shared tasks in Salesforce

 Social Accounts, person accounts, and social leads are now available, just like the already existing Social Contacts.

Social Accounts

Social Person Accounts

Service Cloud case feeds are becoming a little more beautiful with all relevant data in one location.  The Service Cloud is really a great product lately and is getting nothing but better.

Service Cloud Case Feed

Chatter Answers, the enabling of social self-service.  Answers can come from knowledge articles, customer service agents, and a community of experts.  This really could be the wave of the future with customer service.

Chatter Answers

Salesforce Live Agent and the integration with the service cloud.  Live chat with your customers, manage cases, and log everything that was discussed.  Another nice service cloud enhancement.

Salesforce Live Agent

Overall, a nice set of Spring 2012 features released by Salesforce.com.


Tags: , , ,
Posted in Chatter, Radian6, sales cloud, service cloud, Spring 2012 | Comments Off on Salesforce Spring 2012 Release Features

Salesforce Winter 2012 Features

Written by ShamrockCRM on December 21, 2011 – 11:27 am

Salesforce Winter 2012 features.  I know this is a little (very) late, but it is better than never.

There are a lot of big releases during this upgrade and a lot of new things for everyone to learn, like Siteforce and Visual Workflows.  Take a look below to see my platform overview

See the release notes in PDF form here.

Social Contacts

Salesforce Social Contacts – this feature sounds great, but I am not overly enthusiastic.  You can link your contacts to Twitter, Facebook, and LinkedIn.  You can add in their picture and see their posts.  Great!  The problem is that you need to do this contact by contact and social network by social network.  The system does not automatically scour the web and update all of your contacts.  Even worse, Salesforce searches the social networks by the contact’s name.  Have you ever tried searching Facebook for a common name?  You ALWAYS get 100 results. Have fun with that.

Chatter Customer Groups

Customer Chatter Groups – This is a great feature.  Create your own “customer portal” for collaboration and discussion.  Invite your customers into a Chatter group and chat with them, share documents, and more.  I like it.  Maybe try tying this in with an actual Salesforce customer portal?

Dynamic Dashboards

Dynamic Dashboard filtering – This is one of those features that should have been there since day 1.  Now, you can filter individual dashboards by criteria, such as region, industry, product line, etc.  For all of the large organizations out there that have SO many dashboards created in a specific (hokey) way, I wonder how difficult it will be for them to migrate 1000 dashboards into this format.

Case Flow

Case flows – Wow, Cases have become beautiful in the Service Cloud.  Everything seems very social.  It is very easy to add comments, send emails, log calls and more.  This is really a great UI makeover.

Case Flow

The Service Console has somewhat of a small overhaul as well and makes it very easy to find data quickly.

Pinned Lists

Pinned Lists – For the service console, you can now pin vital lists on the left side of the screen to always have the data available.  Very nice.  Time for everyone to invest in wide screen monitors.

Chatter Private Messages

Chatter Private Messages – This is another “should have been day 1” feature.  Very simple.  Send messages to 1 or many people in Chatter.

Chatter Approvals

Chatter Approvals – Integrating approval requests directly into Chatter feeds for the manager that does not like digging through many records to find an action he needs to take.

Chatter NOW

Chatter Now – Integrating instant messaging directly into Salesforce with Chatter Now.  How many instant messaging clients does everyone have now?  Well, here is one more.

Chatter for Microsoft SharePoint

Chatter for Microsoft SharePoint – Allowing for simple integration of Chatter functionality into Microsoft SharePoint.  This seems very useful for making all of your boring internal websites socially enabled.  Great idea.

Quick App Building

Admin quick links – This should make it a lot easier for the new SFDC admin.

Fast App Building

One-click App Creation – Salesforce is trying to make it a LOT quicker to create a new custom object, app, and tab.  Simply click the “Create App” button, fill in a few fields and you are ready to start.  A little bit easier than before.

Visual Workflow

Visual workflows – This is where I get excited.  Visual Workflows allow you to use a cloud designer tool to visually create VisualForce wizards.  So, instead of building a lot of VisualForce, it can all be drag and drop, point and click.  This is something everyone needs to spend a couple of hours learning over the next few months.

Siteforce

Siteforce – is generally available in Winter 2012.  It is essentially a web designer tool and content management system all in one, allowing you to utilize Salesforce as a backend database/admin console and build a dynamic front end website with nothing but point and click.

There are also several smaller features available, such as:
-Likes on Chatter comments
-Cloud designer for Visual Workflows
-Sharing Chatter files via email/IM inside and outside of SFDC (awesome!)
-Upload and Share Files at same time
-More Chatter filters
-Chatter Desktop
-Chatter for Android
-New Forecasts generally available
-Salesforce Mobile Beta for Android phones
-Presentations can no longer be assembled
-Enhanced reports tab (here’s to confused users that just got used to managing their reports)
-iPad mobile dashboards app
-Jigsaw is now Data.com
-Permission sets are now available – no longer need to create an infinite number of profiles to solve small needs!
-Just in Time provisioning for SSO portals
-APEX REST API


Tags: , , , , ,
Posted in Announcements, Chatter, Salesforce.com, Winter 2012 | Comments Off on Salesforce Winter 2012 Features