Tuesday, August 30, 2011

Salesforce Long Text Area and Formulas

If you try to create a formula on a "Long Text Area" field, salesforce does not support this.

One workaround is to create a new field and another workflow to perform a "field update" on this:
Step 1) Create a new field with data type of "Text Area (Long)"

Step 2) Create a workflow with the following settings:

Evaluation Criteria -> select "Every time a record is created or edited"
Rule Criteria -> select "Formula evaluates to true" and type "true"


Step 3) Select "Add Workflow Action" -> "New Field Update"

Step 4) Select the newly created field as the "Field To Update" and select "Use a formula to set the new value" under "Specify New Field Value"

Step 5) You can now enter in a formula that reference other "Long Text Area" fields.  The results will be posted to the new field of type "Long Text Area".

Reasons Behind This Solution
Basically this allows complex logics, ie perform formula calculations on a long text field, to be offloaded to a  workflow which runs on the background.  As a normal formula needs to be calculated very often and can slow down the page on each load/save, shifting the calculations to workflow helps salesforce lower the CPU usage.

Quickly Selecting Data from Salesforce Using System Log

If you just want to quickly see some data in your salesforce instance, you can execute soql queries by opening the Setup-> "System Log" and type in the following

System.debug ( [select Dealer_group_display__c from Account where Id = '001M0000005OFab']);
System.debug( UserInfo.getSessionId() );

This saves you from opening the Apex dataloader.

Developing Native Mobile Applications For Multiple Devices

If you are like me who needs to develop mobile applications, but doesn't want to stick with just one platform, you can try the following products:
PhoneGap http://www.phonegap.com/
Developers create a mobile version of their application using HTML 5 / Javascripts / CSS.  PhoneGap compile this as a native device application which can be hosted in the respective app stores.  The advantage is you are programming in HTML 5 which can than also be hosted as a mobile version of your website.  PhoneGap is free but does take a bit of configuration.

Adobe Flash Builder 4.5 http://www.adobe.com/devnet/flex/articles/mobile-development-flex-flashbuilder.html
For small applications, Adobe's latest Flash Builder 4.5.1 update allow developers to create a mobile Flex project.  It is fairly easy to learn for basic functionalities and is powerful enough to call external webservices and meet other real-life requirements.

Both products allow you to deploy to iPhones/iPads/Androids/Blackberry Tablets as native applications.

The advantage of developing uses these instead of just having a mobile version of your website is that you can minimise network traffic and provide a better user experience after the application is downloaded/installed.

Wednesday, May 18, 2011

DreamFactory migration steps

The following is just one way to migration an installation (ie OpenWealth).

1) Install package onto the new site
2) Use Monarch to migrate data across
3) Migrate page layout

Salesforce Migration Order/Best Practices

A snippet from Dream Factory's Snapshot documentation:

In order to achieve maximum results with your deployment, it is recommended that you follow the documented order of operations that is detailed below for Asset SnapShot Push. This order will minimize the errors generated by contingent dependencies and relationships in your Org. Carefully read any error messages and make adjustments as necessary. If you need to be able to push individual object fields then use the Object SnapShot Push.

1.    Objects: All *
2.    Apex Classes
3.    Apex Components
4.    Apex Pages
5.    Apex Triggers
6.    S-Controls
7.    Page Layouts
8.    Static Resources
9.    Letterheads
10.    Workflows **
11.    Report Types
12.    Home Page Web Links
13.    Home Page Components
14.    Home Page Layouts
15.    Custom Tabs
16.    Custom Labels
17.    Custom Applications
18.    Custom Object Translation
19.    Custom Sites
20.    Profiles: All ***
   
   
* This will push all Object fields plus their related Record Types, Web Links, Validation Rules, Search Layouts and List Views. These settings can also be pushed individually if needed.

** Users tied to workflows must be created in the Destination Org prior to pushing

*** This will push all Profile metadata plus the related settings including: Application Visibility, Field Level Security, Layout Assignments, Object Permissions, Record Type Visibility and Tab Visibility. These settings can also be pushed individually if needed.

Thursday, May 5, 2011

VMware vConverter Cannot Find Your Hard Drive

After you have installed vConverter, it may not be able to find any partition on your machine that needs to be converter.  This is caused by Windows UAC!

If you run the vConverter "As Administrator", vConverter will then see your hard drive.

http://communities.vmware.com/thread/285316

Monday, May 2, 2011

Quick Tools

If you had problems with how MsPaint scews up an image's transparent background, you can try Paint.Net
getpaint.net

If you need to do presentations and need to record it to a video, use Cyberlink YouCam.
http://www.cyberlink.com/products/youcam/overview_en_US.html
supported format AVI/WMV

Free Video Recording
http://camstudio.org/