Pages

Friday, March 23, 2012

Server Monitoring - Project Description

It's a very Salesforce Friday; the weather is nice, my fingers are flying, and most importantly my code is saving without errors!

I'm hoping the description got your attention on this one and you wondering how in the world Salesforce is going to monitor your servers.  Well, I've fed your assumptions a half-truth.  At this point, Salesforce isn't going to be doing the monitoring (yet?); it will be simply providing to you notifications.

I know, I know - you've got high-end systems in place doing all the server monitoring you could ever dream of full of alerts, notifications, bells, whistles, and some Rita's Water Ice on top of that too (you know, in honor of it being Spring).  Don't overlook the point of this series; it isn't to just create a custom object that will trigger some workflow.  It's about being able to tie together three or four different pieces of software to build an entire system that leverages the flexibility of Salesforce (and because all roads will inevitably lead to Salesforce).  Not just a system, but something that can easily be expanded an built upon.

Here's what I'm thinking:

Monitor a server
Use Perfmon - Memory Usage
Use a command-line utility - Hard disk utilization

Create Alerts
What's wrong with who

Import Process
Get that info into Salesforce so we can use it
Where's the data going to live?

Dashboard/Workflow
What are you going to do with that data?

Stay tuned!  We're going to have some fun with Perfmon, batching, Data Loader, and some VF.

Thursday, March 15, 2012

One View to Rule Them All

Scenario:  I was working on customizing a project management app and needed a quick view named "My Projects" that would allow a user to see only the projects in which they were listed as the "Project Manager."

"Project Manager" was a custom User lookup field.  It seemed erroneous to instruct users to create their own views.  There had to be a way that I could create it once and it would provide the correct results for each user.

When you are on the "Create New View" screen, unlike when you are writing a workflow rule, you don't have the ability to create formula based criteria; only the "Filter By Additional Fields" field-operator-value drop downs are available.
IdeaExchange:  https://sites.secure.force.com/success/ideaView?id=08730000000K149AAC




Unfortunately, the Owner of a Project record won't necessarily be the Project Manager, so using the "My Projects" filter won't work (wouldn't it be nice if for any "My" option, a list of User lookup fields would appear that you could select from?)
IdeaExchange:  https://sites.secure.force.com/success/ideaView?id=08730000000grYFAAY


To create one view to rule them all, I ended up creating a formula field that would compare the current user's ID to the Project Manager field and return either 0 or 1.


IF($User.Id = Project_Manager__c, 1,0)


Now that you have your field, any record that you are looking at in which your User ID matches the ID found in the Project Manager field, the "PM is Me" formula field should read "1."


That being so, you can create your view with a single criterion:

That's that!