Showing posts with label Salesforce. Show all posts
Showing posts with label Salesforce. Show all posts

Monday, January 25, 2016

How to Save 5 Seconds: Accessing Salesforce License Count for Admins

Whenever someone asks me "How many Salesforce licenses do we have available?", I start navigating through the admin panel and think to myself "I wish I had a speedier way to get to this information."

Today, I had a spark of inspiration. And for my fellow Salesforce Admin's benefit, I figured out exactly how much time this little spark will save me: 5 seconds.

But, this is about more than time savings... it's about freeing up my brain to focus on other things too.

I realized that I could bookmark directly to the related list that shows the number of user licenses.

Tools I Used

Chrome (my favorite browser)
Speed Dial 2 (extension for Chrome) - optional

Speed Dial 2 allows me to create bookmarks on the new tab screen. As an alternative, I can use the bookmarks bar in Chrome for easy access.

My current Speed Dial 2 bookmarks for work.


Setup

  • Navigate to the Company Information page in Salesforce (Setup -> Company Profile)
  • Right click on the User Licenses related list link at the top of the page and click 'copy link address'. This will give you the url to jump directly to that section.

  • Create a new bookmark in Speed Dial 2 or add the link to your bookmark bar.

And now, for the time-savings comparison:

Previous Method - Manual Navigation

  1. Someone asks: "How many Salesforce licenses do we have available?"
  2. I navigate to where I have Salesforce already open. 
  3. I click on the Setup link.
  4. I expand the Company Profile section and then click on Company Information. 
  5. I click on the User Licenses related list link to jump to the list. 
  6. I note the number of remaining licenses and hop back to my email inbox to respond.
Time spent: 11 seconds. This could probably be faster, but I'm still adjusting to the new setup side panel layout in Salesforce.

New Method - Bookmark

  1. Someone asks: "How many Salesforce licenses do we have available?"
  2. I open a new tab. 
  3. I click on my bookmark.
  4. I note the number of remaining licenses and hop back to my email inbox to respond. 
Time spent: 6 seconds

The time savings might not seem that significant. But, for me it's about more than the time. This method eases a minor frustration and enables me to move on with my day. It requires less thought and navigation. I like that.

Do you have a simple tip for automating part of a process that would normally frustrate you on a Monday morning? Share in the comments!

Thursday, November 19, 2015

How I Give Myself an 'Admin Out' in Validation Rules

I've found myself stuck a few times when I've created a validation rule in Salesforce but needed to update records that would trigger my rule criteria.

Example: I don't want to allow users to update a specific field after it's been populated upon record creation. But, occasionally as the system admin, I may need to update that field when a user makes a mistake.

In the past, I'd edit the validation rule that was preventing me from saving a change and deactivate it. But when you have multiple rules that you're 'breaking', this becomes rather cumbersome.

So, I've started adding an 'admin out' to my rules. There are several ways to do this (by profile id, user id, etc), but here's what's working for me:



I add in a criteria to not allow the change for anyone except a system admin, as defined by the profile name.

This has been working well for me.

Word of warning: I don't recommend doing this for all rules, especially those that prevent changes that could cause errors in reporting or data consistency. Be selective if you choose to allow yourself an 'admin out.'

Do you have an alternative method that works for you? Let me know in the post comments or share it with me on twitter - @rathergeeky.



Wednesday, November 18, 2015

Salesforce Report Challenge: Total of Opportunities for All Accounts Within a Hierarchy

I received a report request today that sounded something like this: I need to get a total of all won opportunities for any account in this account hierarchy, regardless of whether we worked directly for them or were subcontracted*.

Sounds simple, right? 

In theory, yes. But, if you happen to have a complicated account hierarchy (eg: you have any federal government accounts), this is not an easy task. In fact, it's not natively possible to run a report like this in Salesforce.

In my case, I was looking at 80+ accounts organized in a hierarchy that was five levels deep. 

Rather than tell the requestor that the report was impossible, I decided to get a little creative.

Step 1: Get a list of all the accounts to include

I clicked on the [View Hierarchy] link next to the account name. Because I had multiple parent/child relationships, I scrolled until I found the account name that I was looking for within the hierarchy. Then I highlighted all the accounts underneath that, copied and then pasted them into Excel.

This is what my spreadsheet looked like:



At this point, I needed to extract the record IDs from the account name url. I remembered blogging about this before and read through the old post to remind myself how to extract the record ID from a hyperlink.

My spreadsheet then looked something like this:


Step 2: Generate a list of record IDs to use as a report filter

After I extracted my record IDs, I created a formula to concatenate the record IDs into a format that I could use as my report filter. (I demonstrated this method in a previous post.)

Step 3: Create a report and add the filter criteria

I created the report in Salesforce and pasted the concatenated IDs in my filter. Since I wanted to filter by two account fields on the opportunity, as well as by the parent relationship, I had to add those three fields to my filter. (Note: Several of these fields are custom formula fields based on the lookup to the Account object.)

Because the filter criteria can include only so much text, I split the record ID list into two filters for each field that I wanted to apply the filter to.

Here's how it looked:



Final Thoughts

I'd much prefer an approach that is more dynamic, rather than hard-coding the record IDs to generate a report. But for now, it does what I need it to do.

If you'd like to see some improvements to functionality surrounding parent/child accounts and account hierarchy functionality, vote up these ideas on the IdeaExchange: Add more account hierarchy functions for parent/child accounts, Report on Account Hierarchy

Have you ever received a request for a Salesforce report that stumped you? Or do you have an idea to improve my workflow? I'd love to hear your suggestions and stories in the comments below.


*We have a Secondary Account custom lookup field so that we can track not only the direct client the opportunity is for, but also the account that may have hired them (when we are operating as a subcontractor).

Thursday, March 26, 2015

Promoting My Brand Internally as a Salesforce Admin with New User Welcome Emails

In my last post about using the Vertical Response WYSIWYG editor to create emails for my Salesforce workflows, I mentioned that I would share how I use this method to promote my brand as a Salesforce Admin within the company. So, here's the story.

When it comes to my personal brand, I'd summarize it in these words: approachable, knowledgable, responsive and helpful.

I want to be the person my coworkers go to when they have a suggestion for improving CRM for the company, who they contact when they aren't sure how to follow up on a lead assigned to them, the name that pops into their head synonymous with Salesforce.

Conveying that image starts with my very first correspondence with them, typically the 'new user welcome email' that I send when I create their user account in Salesforce.

To help enforce this brand, I recently began redesigning my internal support emails, including that new user welcome email.

Here's what it looked like before:



It wasn't horrible. I just thought it could be a little more streamlined and use a bit more pep. My video tutorial was also quite out of date (besides, who has time for a 1 hour video tutorial?). So, I transferred the most important points into an updated Google Slide presentation.

And here's my redesign:






I like that this format is personable; I've added my picture at the bottom because working remotely means I rarely get to meet my coworkers. It's pops a bit more with the simplified layout and graphics. The flow of information is improved and it makes it easier for the user to see what they have to do next.

Here's a peek at a few slides in the presentation that I link in my email:




A little side-by-side comparison:



And finally, here's how I use this email template:
  1. Create new user.
  2. Navigate to 'Mass Email Users' under 'Manage Users' in Setup.
  3. Refresh 'New Users' list view that I've customized to show users created today.
  4. Select my email template. 
  5. Send, leaving the default to bcc myself checked.

If you're interested in improving your personal brand, here are a few articles that I found useful:



PS - The icons I used in my updated email are from: http://icons8.com/free-ios-7-icons-in-vector/

Wednesday, March 25, 2015

How I Use Vertical Response's Email Builder to Create Formatted HTML Email Notifications for Salesforce Workflow Rules

When you've been a Salesforce Administrator for a decent length of time, you might look back on the way you implemented certain features or customized the application and be struck with this thought: "Knowing what I know now, I wish I would have done it differently."

That's the situation I found myself in as I reviewed some of our workflow rules and email notifications recently. 

Most of the email notifications were plain text and rather... blah.

So I decided to spiff them up with a little help from the html email editor that I use for creating marketing email campaigns: Vertical Response for Salesforce. 

Perks: 
  • It's free to design emails with the Vertical Response WYSIWYG editor. 
  • It's easy to use.
  • You can paste the resulting html directly into your Salesforce email template.

Why do I use Vertical Response's editor instead of the Salesforce editor? I like to use the 'Custom (without using Letterhead)' template creation option, which means I would have to code all the html by hand. No thanks. 

Here's my process: I start off by having two tabs open. 1) 'VR Email' tab in Salesforce, 2) my new Salesforce email template, with the option of 'Custom (without using Letterhead)' chosen.

Then I proceed with the following steps:

Step 1: Design the email in the Graphical Editor.


I create a new draft email in Vertical Response. 

I like to use a centered table to make the email a bit more visually appealing.

In this example, I pasted the field names from Salesforce so that they would merge correctly.

When I'm done with my editing, I save the draft. If I need to make changes in the future, I can just come back to it in Vertical Response, make my modifications and replace the html in Salesforce with the updated version.


Note: I recommending doing all your copying and pasting text into the VR editor before you attempt to format your text. I've noticed that if I copy and paste (even if I use 'paste unformatted'), it strips the existing formatting of my entire email. Blargh. So, save yourself the frustration and get all your content in there first before you begin modifying fonts, sizes, etc.

Step 2: Preview the email.


If there are any basic formatting changes to make, it's easier to do them now than manually in html.




Step 3: Copy the code from the 'HTML Code' tab.


After selecting all the html, I copy it and switch over to Salesforce.




 Step 4: Paste the html into the 'HTML Body' area of my email in Salesforce.



Step 5: Click on the 'Preview' button and admire the result. 





Step 6: Click Save.


Now my fancified new email template is ready for circulation. It's a big improvement over the plain text version!



Coming Soon: In my next post, I'll show you how I used this method to redesign my 'new user welcome' emails and promote my brand within the company as a Salesforce Admin.



Thursday, January 8, 2015

Salesforce Admin Journal: Simple Sidebar Feedback Form Using JotForm

Hello my fellow Salesforce admins!

I'm working on rolling out a few changes to our Salesforce org and want to make sure that users can offer feedback as painlessly and conveniently as possible. They shouldn't have to switch tabs or compose a new email, or input any other information aside from their comment.

Ideally, a 'Comment' box and 'Submit' button could dwell right there in the sidebar itself. But, after some googling and brainstorming, I wasn't quite sure how to implement a solution that simplistic.

Instead, I found a workaround for the next best thing: a link to a popup form (created with Jotform, one of my favorite tools) that pulls in the user's email address from the url.

Here's how it turned out:


Designing my super simple form in Jotform. 

I customized the thank you page.

I created my url - passing the current user's email into a field on my form, per this tutorial.

The finished link

The form pops up.
The email notification that I receive when a user submits a comment with the form.

All things considered, I'm content with this simple solution. It might not be the most elegant, but it's easy for users to use and easy for me to maintain/customize.

Win win.


Thursday, December 4, 2014

Salesforce Admin Journal: Guide & Gather Feedback Using a Google Form Before Deploying Changes

Hello fellow Salesforce admins!

In this post, I'm going to share a challenge I faced as an admin and the solution I came up with.

Imagine that you've made some changes to your Salesforce org that you'd like users to test - a new visualforce page with a few new fields, for example. You want to easily gather their feedback but the idea of assembling everyone's responses via a bunch of separate email conversations makes you antsy. Plus, you'd like a way to guide them through the testing step by step. 

You want to make it as simple as possible for them to share their comments... because you know that will encourage your testers to actually provide feedback... which will improve the quality of your changes when you roll them out to your entire org.

Now that you've got a good idea of the challenge, here's my solution: Google Forms

I created a form that outlined the process for testing and provided a text area for comments at each step. 

It looked similar to this (but with quite a few more screen captures and long text fields):



Now, after my group of testers are done, I can easily review all their feedback in a Google Spreadsheet.

If you'd like to make a copy of this sample Google Form to customize for your feedback-gathering needs, click below:



Note: Clicking on this button will run a custom Google Script that will copy the file to your Google Drive. You'll have to give it permission to run first.


PS - I followed these instructions from the answer from Arun Nagarajan to create the Google Script that allows you to copy the Google Form to your own Drive. Handy dandy!

PPS - I wrote this post on my own without prompting or compensation from any of the software companies involved.

Tuesday, June 3, 2014

Tip: How to Fire an Updated Trigger on Existing Salesforce Records

Hey Salesforce Admins,

Here's a tip to help you if you've got a recently updated or newly created trigger (or workflow rule) that you want to fire on existing records.

Create a custom 'Admin Filter' text field on the object that you are running the trigger on. You don't need to add it to any page layouts or make it visible to users. (I chose this method because I didn't want to update any existing fields that are already in use in order to force the trigger to fire.)

Then, use the Data Loader (or Mass Update Anything) to update that field on all of your records.

Ta-da! The update will fire the trigger on all records that match whatever criteria you've specified.

Now, I'm off to do this in my own org.


Friday, May 16, 2014

Salesforce Admin Journal: Teaching a Man to Fish.... or at Least to Create a Report

I regularly receive requests from users to create a specific report. Often these are reports that no one else needs access to.

We are trying to cut down on the number of reports in the 'Unfiled Public Reports' folder. So, I'm encouraging users to save reports that they may need in the future to their 'My Personal Reports' folder.

I'm also working on teaching them how to create reports on their own. As I mentioned in this post from last year, I think it's important to educate people whenever possible rather than just doing something for them automatically because 'it will take me less time.'

This method doesn't just benefit me by reducing the number of request I will receive in the future. It also helps my users become more self sufficient and capable.

Today, a user chatted me a report request. In response, I recorded a one minute long tutorial that will help him learn the basic skills needed to prepare the report himself.

Here's the response I received:



That was totally worth the few extra minutes it took me to record the tutorial using Jing.

Wednesday, April 23, 2014

How to Extract Salesforce Record Ids From a Hyperlink

I recently found myself viewing a Salesforce report with fields that I wanted to update. But, I needed the id to do that. Unfortunately, the report was a standard report (in this case: HTLM Email Status), so my customization options were limited.



So, I copied and pasted the report data into Excel.

I needed a way to extract all the hyperlinks from the text so I could get to the record IDs in order to update. I followed the directions here to create a macro that extracted the hyperlinks.

Here's how it all came together: 


1. Paste hyperlinked text into Excel. Add a column for Extracted URL.



2. Navigate to Visual Basic Editor.





3. Create a new Module.



4. Paste the following code into the module. (Get the code here.)


5. Run the code.



6. After the hyperlink has been extracted, pull out the record id with a formula.




7. Expand the formula for all rows.


And that's it!

So, if you ever find yourself struggling to update records when you don't have the id accessible, but do have the hyperlink, now you'll know what to do.

Thursday, December 5, 2013

Finding the Ultimate Parent in an Account Hierarchy with a Simple Formula

Traversing the account hierarchy via the Parent Account field can be challenging.

I was doing some research into including 'Ultimate Parent' in reports - so that you can see all Opportunities for any account in the hierarchy, for example.

I knew I had read something about it... and after spending a few hours searching, I discovered that not only had I read something, I had actually already implemented it. Ha.

I don't remember where I got this formula, so if it looks familiar to you, please let me know. It's a pretty awesome way to use standard functionality and can go through a hierarchy of up to 10 levels.

How to Do It:

  1. Create a text formula field named 'Ultimate Parent Name' on the Account object.
  2. Paste the following into the formula:
  3. IF( LEN(Parent.Name)<1 ,HYPERLINK("/"&Id, Name,"_parent"), IF( LEN( Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Id,Parent.Name,"_parent"), IF( LEN( Parent.Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Parent.Id,Parent.Parent.Name,"_parent"), IF( LEN( Parent.Parent.Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Parent.Parent.Id,Parent.Parent.Parent.Name,"_parent"), IF( LEN( Parent.Parent.Parent.Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Parent.Parent.Parent.Id,Parent.Parent.Parent.Parent.Name,"_parent"), IF( LEN( Parent.Parent.Parent.Parent.Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Parent.Parent.Parent.Parent.Id,Parent.Parent.Parent.Parent.Parent.Name,"_parent"), IF( LEN( Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Parent.Parent.Parent.Parent.Parent.Id,Parent.Parent.Parent.Parent.Parent.Parent.Name,"_parent"), IF( LEN( Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id,Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name,"_parent"), IF( LEN( Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id,Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name,"_parent"), IF( LEN( Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name )<1 ,HYPERLINK("/"&Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id,Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name,"_parent"), "Ultimate Parent Beyond 10 Levels"))))))))))

What it looks like:



I can now use this field in reports for grouping or filtering if I want to see all Opportunities belonging to any account in this particular hierarchy. Cool!

Note: We've already implemented the customizable inline account hierarchy (that's what you're seeing in the picture, with the formula field below it), which displays the hierarchy as a visualforce page on the Account page layout. Super handy!

Thursday, October 31, 2013

Salesforce Admin Journal: Creating Groups based on Criteria with Workbench

I have so many posts in draft that I just haven't gotten around to finishing. So, instead of waiting and stressing and feeling ridiculous about it, here's something short that I stumbled upon today.

Scenario:

I wanted to create several public groups based on some criteria (in my case, I was using email domain). I discovered that was pretty much impossible in Setup. I was only seeing an option for creating a group and then adding users manually or by role/profile.



Solution:

  1. I created my groups in Setup. I don't think you can create a group without a single member, so I added someone I knew would be included anyway based on my criteria.
  2. I exported a query of all my active users as a csv (I used LexiLoader but Workbench would work great too).

    Select Id, LastName, FirstName, Email FROM User WHERE IsActive = True 
  3. I opened my csv in Excel and sorted it by the field I wanted to use to segment my groups and added a column for Group ID.
  4. I copied the id from the url for each newly created group.
  5. I pasted the group id into my sorted csv for each user as I wanted to segment them in my groups.


  6. I did a 'save as' on my csv.
  7. I used workbench to upload the file in the GroupMembers object.




Ta da! Done! Perfect!

This process was much easier for me than trying to manually add the users to these new groups.

I haven't used Workbench that much in the past but I'm realizing that it is pretty stinkin' handy. I've been a bit frustrated with LexiLoader lately (which is the Mac version of DataLoader) and I often miss the Excel Connector (which is only for Windows OS) but even that had its flaws. 

And that's all for today... until I finish those almost done blog posts that are glaring at me.


Thursday, July 11, 2013

Creating a New Salesforce Record with One Click: Passing URL Parameters from Google Form Responses

Today, I spent several hours figuring out a URL parameter hack to save me a few minutes of entering data into Salesforce.

While it may not have been the most efficient use of my time, I learned some things that will help me when attempting similar tasks in the future.

I thought I'd share the requirement I was facing and how I accomplished it.

The Requirement


I needed a way to have users submit information to create a Lead but not have to manually input this data directly into Salesforce. For my own sanity, I didn't want to the process of inserting records to be too labor intensive.

How I Did It


I started by creating a Google Form with the information I wanted to gather. Then, I went into the form responses spreadsheet and added a few more columns.

In these columns, I put a HYPERLINK() formula that would create a link into which values entered in the form would be passed as parameters.



The result? With a single click of the link I can create a Lead or Task in Salesforce with information that was entered into the Google Form.

The concept can be used in a variety of ways.

If you'd like a more in-depth explanation, check out the steps here.

PS - I love using Clarify to document my process, as shown in the link above. If you haven't checked it out and find yourself sending screen captures on a regular basis, do! This post wasn't sponsored and I'm not being compensated. I just love their product.


Jenna Weiner is a rather geeky girl with average social skills and an affinity for: Google Apps, Salesforce.com, Pinterest, Firefly, dresses, indoor plants and life-hacking. Have a suggestion for a post or a question? Feel free to get in touch.
Email: rathergeeky@gmail.com
Twitter: @RatherGeeky
LinkedIn: View My Profile

Friday, March 8, 2013

Video Tutorial: How To Use a List of Record IDs as a Report Filter in Salesforce

I sometimes have to generate reports based on specific record ids.

I've found a little trick to format these ids (if they are in a list) so that I can pop them in as either a report or list view filter.

View the tutorial by clicking on the screencapture below.




Jenna Weiner is a rather geeky girl with average social skills and an affinity for: Google Apps, Salesforce.com, Pinterest, Firefly, dresses, indoor plants and life-hacking. Have a suggestion for a post or a question? Feel free to get in touch.
Email: rathergeeky@gmail.com
Twitter: @RatherGeeky
LinkedIn: View My Profile

Wednesday, December 26, 2012

Combining, Segmenting and Managing Salesforce Campaigns with AppExchange Apps

Recently, I faced a rather daunting task to launch a 2-part multi-segment marketing campaign of around 14,000 members.
It is possible to use out-of-the-box tools plus a few free apps to create segmented campaigns and get your sales team involved in campaign planning.

In our org, we've been managing our campaigns for 5+ years using the standard Campaign object, but we're definitely feeling the need for a marketing automation tool that would make this process a whole lot easier.

But for now, we've got Campaigns.

I thought I'd share my process if you too are not in a position to invest in a marketing automation tool.

Step 1: Define criteria to add contacts to campaign. 

We wanted to pull in active contacts (custom picklist field) based on the most recently won Opportunity for the Account that they belong to (custom rollup field on account). So, I created a report with those criteria. Then, I added them all to one big "For Review" campaign using the 'Add to Campaign' button. You'll find out why in Step 3.



Monday, February 27, 2012

Admin Journal: Crafting a Unique Id for Updating when Record Id is Missing (@salesforce)

Dear Admin Journal:

Sometimes, users do something silly... like exporting a report to Excel, making changes that they'd like me to import and forgetting something pretty important: the record id.

It's not impossible to update records without the record id. It's just not handy... and it can be error-prone.

Over the years, I've figured out various ways to get around the missing record id, usually involving several queries and some rather complex vlookups.

But, here's a pretty simple method that I used today when the csv I received from a user had only 7 columns + one column for reassigning record owner.

  1. I queried Salesforce to pull out the same 7 columns + record id with LexiLoader.
  2. In my user's spreadsheet, I created a new column. I concatenated 3 fields that I knew would have at least 2 unique values, so it looked kind of like this:

    AccountName&LEFT(BillingAddresss,5)&BillingCity
    .

    Side note: I used the LEFT() function because my user had copied the data from a report in their browser and pasted it into Excel. The Billing Address had split into two rows in the spreadsheet. So, it wouldn't match my query.
  3. In my query spreadsheet, I created 2 new columns. In one of them, I concatenated the same 3 fields to use as a unique id. In the other column, I created a vlookup to match my manually created unique id and return the column that had been updated in my user's spreadsheet.
  4. Before updating using LexiLoader, I could remove the columns that I'm not using (Owner Name, Forged Unique ID, etc), or I could just leave them out of the field mapping.
It sounds kind of complex. But trust me, it's simple. 

Here's a rather lame screenshot (Skitch doesn't support blurring? What!?):



So, when I'm stuck with a spreadsheet without the record id and the user is waiting for me to update their data, I calmly remind myself of this.

In other news, I switched to a MacBook Pro last week. While I really like my Mac (I hesitate to say 'love'... but I'm sure someday I will), I've found that quite a few of the tools that I relied on are not available. I'm missing the Excel Connector, but I'm making it work with LexiLoader (a version of the Apex DataLoader for OSX) and Excel (although OpenOffice or Google Docs would work fine too).

Now, I'm off to finish updating.

Love,

Jenna, The Admin

Jenna Baze is a rather geeky girl with average social skills and an affinity for: Google Apps, Salesforce.com, Pinterest, natural light photography and finding creative ways to avoid doing dishes (which includes updating a handful of blogs).
Email: rathergeeky@gmail.com | Twitter: @RatherGeeky | Facebook: Rather Geeky Tips

Tuesday, August 2, 2011

{Update} Val Rule to Prevent ‘Dear John L.’ has a Glitch – Fixed! #DataQuality @Salesforce

A few months ago, I shared a validation rule for Contacts to prevent sending emails with “Dear John L.”

My data quality check ensured that users didn’t enter a middle name in the first name field.

But, when I was doing some updates with the Excel Connector yesterday, I realized that my validation rule had a glitch.

It was correctly preventing middle names in the first name field, but it was also throwing the same error when they entered a name that happened to be abbreviated (such as “A. R.”). Or in this case, I was getting the error when I attempted to update the records en masse.

2011-08-01_144033

So, I’ve updated my rule to allow abbreviated first names by adding a function to my formula to cause it to fire only when the length of the field is greater than 5 characters.

This accounts for names where a space exists between the acronym or vice versa.

Here is the original error condition formula:

2011-08-01_144116

And here’s the updated one:

2011-08-01_144317

If you have a more effective way to accomplish this, please do share in the comments!

Related Posts

Jenna Baze is a rather geeky girl with average social skills and an affinity for: Google Apps, Salesforce.com, Pinterest, natural light photography and finding creative ways to avoid doing dishes (which includes updating a handful of blogs).
Email:
rathergeeky@gmail.com
Twitter: @RatherGeeky
Facebook: Rather Geeky Tips

Monday, May 23, 2011

The @Salesforce Community Comes to the Rescue…. Again

I began my day a tad frustrated.

At the end of each month, I have to manually update the criteria in 4 list views so that I can send out a reminder email to users with a link to update records for the current fiscal period.

Background

Since a calendar month may not match a fiscal month exactly, we created a trigger to populate Fiscal Month and Fiscal Year (custom text fields) based on Opportunity Close Date and our custom fiscal year settings. Shamrock CRM developed this trigger for us and it’s working great!

However, I’m still left with the task of updating each list view manually like this:

image

After a year and a half of doing this, I decided that there had to be a better way. I tweeted my question.

Inspiration for a Solution

@hammnick, @knthornt and @michaelforce replied with suggestions.

I learned that you can filter based on Fiscal Quarter quite easily. Just use Close Date = THIS QUARTER. But, when it comes down to showing records for the current Fiscal Period, there is no date keyword to use. (Believe me, I tried. THIS PERIOD just gets an error.)

@michaelforce and @knthornt’s suggestions gave me an idea.

image

image

I create a new formula field that displays either “Current Fiscal Period”, “Previous Fiscal Period” or “Future Fiscal Period.” It compares the current date with 2 other custom fields that our trigger updates: Last_Day_of_Fiscal_Period__c and First_Day_of_Fiscal_Period__c. I created these fields and added them to the trigger, but hadn’t used them effectively in logic. I’m glad we have the data available though!

Here’s the formula.

image

And a closer look:

IF(
   AND(TODAY()>=First_Day_of_Fiscal_Period__c,TODAY()<=Last_Day_of_Fiscal_Period__c),"Current Fiscal Period",
      IF(TODAY()> Last_Day_of_Fiscal_Period__c,"Previous Fiscal Period",
         IF(TODAY()<Last_Day_of_Fiscal_Period__c,"Future Fiscal Period","unknown")
)
)

 

Side note: I believe that I covered all scenarios, but I added the “unknown” text just in case.

It works!

Now, I don’t have to manually update my list views each month. I just filter based on this formula which does the work for me.

image

And the complex criteria in this other list view is greatly simplified!

Before

image

After

image

This will save me a bit of time (and potential headaches) each month.

Thanks again guys! (Gotta love the Salesforce Twitter community.)

Jenna Baze is a rather geeky girl with average social skills and an affinity for: all things Google, Remember the Milk, Salesforce.com, Inbox Zero, Etsy, natural light photography and finding creative ways to avoid doing dishes (which includes updating a handful of blogs).
Email:
rathergeeky@gmail.com
Twitter: @RatherGeeky
Facebook: Rather Geeky Tips