Monday, May 30, 2011

How to make a picture as a link in salesforce

In a scenario i need to make a URL that takes user to a Picture. Then i thought what if we put a small picture in place of a text and make picture a URL.

Although i had no idea but from bookshelf i know i must start with IMAGE(image url, alternate_txt, height, width) Function and a formula field.

so i created a formula like this:

IMAGE( "https://c.ap1.content.force.com/servlet/servlet.FileDownload?file=" & Picture_ID__c  , "Picture")

Lets check how this function work. first part is the address of the picture that i stored in documents area, to grab url specific to your environment just go to Documents Tab file location and click view image and copy the url from address bar. To make it dynamic i used a Picture_ID field as a place where Image id is to be stored then appended with the URL using concatenating operator(&) and at last the Text("Picture") that will act as a hover text.

At this point i check and found full size image in page layout that make no sense of making link if original image shown at first place.

So i changed formula field look like

IMAGE( "https://c.ap1.content.force.com/servlet/servlet.FileDownload?file=" & Picture_ID__c  , "Picture", 25,25)

I added last optional arguments of IMAGE() formula height and width.

This part of formula will only show image now we need to make it hyperlink so i changed formula as below


HYPERLINK("/servlet/servlet.FileDownload?file=" & Picture_ID__c, IMAGE( "https://c.ap1.content.force.com/servlet/servlet.FileDownload?file=" & Picture_ID__c  , "Picture", 25,25))

In this HYPERLINK function first part can be the same link that we provided in IMAGE function and second part is the Image that we want to make as a link. so whenever we click on image the original size image will be shown in new window.







Can Check box be required in Sales Force

Yesterday i was working on something and to full fill a requirement i tried to make a check box required. Without looking at the feasibility i start going ahead and found this can't be done.
A field can be made Required at the time of creation or on the page layout and i tried both but no luck.
Then i tried with the help of Validation rule and created a rule like:

IF( test__c , FALSE, TRUE)

Although it worked fine but i rechecked it as being a tester and then i found it is not feasible at all.

How?
Let suppose you want it required but what if user don't want it to be checked in that case rule will not fire and that is the reason why Sales Force haven't provide facility to make a check box required.




Thursday, May 26, 2011

Thought of the Day

No one will manufacture a lock without a key.
Similarly,God won't give problems without solutions.So never worry.Efforts always succeed.

Salesforce.com Introduces Jigsaw 2

Jigsaw

Say good-bye to tedious lead searching and dirty data: Jigsaw speeds sales with immediate access to more than 26 million highly accurate B2B contacts—sourced and continually updated by a cloud-based community of 1.6 million professionals.

Advantages:
  • Quickly reach the right people: With access to 26 million accurate contacts, Jigsaw is the best B2B contacts fetcher that are accurate and complete with current email and phone numbers.
  • Jigsaw serves you as a standalone platform or integrated inside Salesforce CRM
  •  Shorten sales cycles and jump-start CRM adoption
  • With access to 26 million accurate contacts, Jigsaw is the best way to drive deals, boost wins, and strengthen internal lists with targeted leads that increase revenue and marketing campaign ROI.
  • Use Jigsaw to flag duplicates in your lists, backfill info in existing records, and fix outdated information, so you can focus on high-impact contacts.
Look at a Snapshot and feel how hassle free it is.



 With this new release, Salesforce customers can acquire Jigsaw user licenses then simply have system administrators “turn Jigsaw on,” allowing users to immediately start accessing complete contact details for over 26 million accurate business contacts.