Thursday, March 15, 2012

Entering a Specific Date in APEX

I was trying to assign a calendar date like this

q2.Calendar_Date__c = '03-14-2012';

That doesn't work! You have for create a new Date Instance like this....

q2.Calendar_Date__c = date.newInstance(2011, 03, 14);


This is the board the I found this on: (Thank you Bob Buzzard!)

http://boards.developerforce.com/t5/Apex-Code-Development/Date-Variable/m-p/197399/highlight/true#M33430

Wednesday, February 22, 2012

Getting File Extensions from a Folder

Just found this....

I was needing to find a way to pull out all of the file extensions in bulk so they could be imported into Salesforce in one way or another.

Simply open the command prompt and type the following

dir c:\users\josh\desktop\foldername /b /s >c:\users\josh\desktop\outputfile.txt

The /b gives you a 'bare' file with just the extensions and nothing else

The /s gives you all of the sub-folders within that folder that you are looking into

The '>c:\users\josh\desktop\outputfile.txt' outputs the file into a text document

http://spreadsheetpage.com/index.php/tip/getting_a_list_of_file_names/

Thursday, February 9, 2012

Excel Contains Formula

Just a quick little formula that checks to see if a cell contains specific text. This one checks to see if the cell contains the "@" sign, if it does then it puts an X in the cell if not then it will be left blank.

=IF(ISNUMBER(SEARCH("@",A2)),"X","")

Friday, February 3, 2012

Exporting Attachments from Salesforce.com

When you export attachments from Salesforce.com you can choose to include the attachments in the export however when SF exports the attachments it does not give you the actual files. What they give you is quite useless...

I found this tool that was put together by someone that wanted to extract all attachments from Salesforce and because they wouldn't give them in the data extract he created this tool.

Below is a link to download the tool called FileExporter. It works great!


https://sites.google.com/site/ezrakenigsberg/blog/fileexporterexportattachmentscontentordocuments

Tuesday, January 24, 2012

Multi-Select Pick List Video

A wile back I posted a set of instructions on how to update a Multi-Select Pick List into a single cell in excel to be imported to Salesforce with Data Loader. Here is a video to demonstrate!





Below is a link back to the original post:

Friday, January 20, 2012

Salesforce to Salesforce Automation Trigger

Here are a couple links for some Salesforce to Salesforce trigger automation. The first is the basics on S2S that shows how to set it up and a quick snippet of code showing you how to share automatically with APEX. The second is a developer helping another developer work through some problems he had in the code, both of which may be helpful...

http://wiki.developerforce.com/page/An_Introduction_to_Salesforce_to_Salesforce

http://boards.developerforce.com/t5/Apex-Code-Development/Can-you-automate-record-sharing-in-Salesforce-to-Salesforce-with/m-p/324669/highlight/true#M57503

Tuesday, January 17, 2012

Converting 15 Digit ID to 18 Digits Case Sensitive ID

Just found this great video that walks you through how to convert 15 digit SF Ids to 18 digits so they will be case sensitive. The 15 digit Salesforce Id that you see in reports is not case sensitive therefore it can not be used in vlookups with excel or any other program that requires case sensitivity. The 18 digit Salesforce Id however IS case sensitive, so this is a little video that shows you how to convert it...

http://www.blog.bdgreen.it/2011/01/09/salesforce-ids-and-the-15-18-digit-problem/

If you are working with data already in Salesforce and need to convert the 15 digit SF ID to 18 there is a formula field function called CASESAFEID(id) that will display the SF ID as a 18 digit case sensitive id in Salesforce.