Pages

Monday, December 31, 2012

Salesforce Customer Community

You have technical question on Salesforce.com configuration? There are few place to ask questions:

1. Salesforce Customer Community
This is forum supported by Salesforce and answer by Salesforce user community global. Post your questions from http://success.salesforce.com/answers. Usually a 'hero' (like SteveMo, phiberoptik, etc) will answer your questions. But as this is a forum, don't expect your questions will always response. Try to post your questions as clear as possible.

This forum particularly only for Salesforce admin, if you are not admin, please check with your admin before post questions here.

2. Salesforce Support
Open a case from 'Help & Training' link next to your name in Salesforce.com top right corner. Click "Contact Support" and "Open a Case". You also can "Ask the Community" from this page, which will be redirect to the same Customer Community above.

If you do not purchase Premier support or using Unlimited Edition, please expect 2 business days response. For Premier support customer, response time is 2 hours.


As today is the last day of 2012, I would like to say "Happy Holiday and Happy New Year 2013, may the year of 2013 ahead bring all of us a better health, prosperous in love and live. GBU!"

Also, today I hit rank #5 for the first time in Salesforce Community Support.





















Using Salesforce Content and Chatter File to share file

Two months ago, I wrote a blog on how to publish image or document to public using Salesforce.com easily using Document. It works well, but Document have some limitation, very basic and do not have security:
- Cannot set password protection
- Cannot set expiration date
- Do not have visibility on view count, first and last file viewed
- Do not link to a record in Salesforce
- Do not have build-in preview
- Do not have version capability
- Maximum up to 5 MB of file size, more information here
But, document still a good option to sharing file internally with security of access implemented in Folder.

In this blog, I would like to share using Content Delivery and Chatter Files to share file with public.

Content Delivery

1. Enable Content Delivery.
Contact Salesforce support to activate Content Delivery (if it has not been activated), don't be afraid as this feature is free. To check if Content Delivery is activated, navigate to SetupCustomize  - Salesforce Files - SettingsContent Deliveries, if you see Content Deliveries menu here, your instance already has been activated with Content Delivery. Make sure Enable content deliveries is checked.


2. Add Content Delivery related list to the page layout, example to Account.

3. From object (in this sample Account) page layout, scroll to Content Deliveries related list added and click button Deliver Content.

4. Choose a file to upload and follow the wizard, you can rename delivery name, set notification, expiration date, and password. If your file is Microsoft Office file, you have more option for Delivery Method.


5. Done. You can pass the URL to your business partner securely and you know if when he open the file.

Using Content Delivery, you can upload file size up to 2 GB, compare this to Document which only 5 MB. For more information on setting Content Delivery, click this link


Chatter Files

Another option to publish file using Chatter File.

1. To share via Chatter File, you need to activate in Content Delivery as well, see points above to activate Content Delivery.

2. After Content Delivery activated, make sure Enable Creation of Content Deliveries for Chatter Files is checked.


3. Once Enable Creation of Content Deliveries for Chatter Files is checked, to allow user to share file via link, add permissions Create and Share Content Deliveries for Chatter Files in user profile to allow user to share file via URL.

4. Go to Files tab, upload file. You will see a new menu Share via link



5. Done. URL created will have the same format with Content Delivery link.

For more information on sharing Chatter files via link, click here


Few items to note using Content Delivery and Chatter Files
  1. Using Chatter File, you do not have option to download in PDF, enable password, enable expiration date, notification and timestamp when the file open.
  2. Although file uploaded via Content Delivery will be in Chatter Files, but you will not have "Share via Link" menu option.
  3. Both Content Delivery and Chatter File support up to 2 GB of file size limit.
  4. Both Content Delivery and Chatter File support file preview.
  5. Both Content Delivery and Chatter File allow you for upload new version. To upload new version for Content Delivery file, go to Content Detail Page in Chatter File.
  6. To delete file uploaded via Content Delivery, go to Content Detail Page in Chatter File.

Reference:



Wednesday, December 19, 2012

Cross-Object Workflow in Salesforce.com

With Spring '12 release, cross-object field update in workflow rules and approval processes is now support standard objects. Both custom-to-standard and limited standard-to-standard relationships are supported. This feature only available in Enterprise and Unlimited edition.

Only Master-Detail relationship support for cross-object workflow, so it is not for objects with Lookup relationship.

Here is a sample case of using Cross-Object workflow.
Master object: Customer__c
Child object: Order__c
Company would like to know how total amount and when latest order for each customer, use payment date instead of order date. Payment date will be blank when customer have not make payment.

Here we go:
1. Create a workflow in Order 
Evaluation Criteria : Evaluate the rule when a record is created, and every time it’s edited
Rule Criteria:
NOT ISBLANK( Payment_Date__c ) && 
( Payment_Date__c >= Customer__r.Payment_Date_hidden__c || 
ISBLANK( Customer__r.Payment_Date_hidden__c ))

Explanation:
- if Payment Date in order is blank, stop workflow
- if Payment Date in order is newer than stored Payment Date in customer, proceed workflow OR if stored
Payment Date in customer is blank



2. Create a field update action in Order
Update Payment Date in Customer
Select object = Order
Field to Update = Customer, the select field Payment Date
Formula Value = Payment_Date__c from Order



3. Create a Roll-Up Summary field in Customer for Total Amount
Create new Roll-Up Summary field from Customer object
Summarized Object = Orders
Select Roll-Up Type = SUM
Field to Aggregate = Amount
Filter Criteria = Payment Date NOT EQUAL TO blank


Last one, remember to Activate the workflow.

If you see in above process, workflow in Order will update field in the parent object Customer. So, it is cross-object workflow field-update.

The same solution you can use to update Account from Opportunity, example: if opportunity is Closed Won, automatically update Account Type to Customer.


For more information and standard objects supported, see this release document and find section Cross-Object Workflow. 

Thursday, November 29, 2012

Record Type in Salesforce.com

If you are using Salesforce.com with Enterprise, Unlimited and Developer edition, Record Type is a powerful feature. We can define business processes, picklist values, and page layouts to different users based on their profiles. So, even for the same object, user can have different page layout with different fields, different picklist value and etc.

But, sometimes admin overkill of Record Type usage. Not all condition need to use record type, may be a custom picklist field is enough. Please note that record type is different with a normal custom field and you cannot just edit record type like normal picklist field.

So, when do you need to setup record type?
1. Different Page Layout
Same user need to see different page layout based on a type. User will see different field position, required fields, buttons, related list for the same records.

2. Different Picklist Value
Configure available values in picklist field depends on the record type.

3. Assign record type only for certain profiles
We can set available record type and default record type for each profile.

This is some scenario you do not need to setup record type actually
1. Use as Type picklist
This is very bad, do you notice once you have record type, when user create new record, they have to select a record type before come to the main screen, so please plan ahead correctly.

2. Page layout usage
Not always need to have record type to differentiate user not see some fields in page layout. Admin can adjust using field level security, so some profiles will NEVER see that field, in page layout, report, etc.

Once you have more record type, it is more effort need to maintain, so if possible use less record type.

Here link to record type cheat sheet from Salesforce.com

Sunday, November 18, 2012

Salesforce.com Queue SOQL

Queues allow groups of users to manage a shared workload more effectively. A queue is a location where records can be routed to await processing by a group member. The records remain in the queue until a user accepts them for processing or they are transferred to another queue. You can specify the set of objects that are supported by each queue, as well as the set of users that are allowed to retrieve records from the queue.

Queues available in almost all Salesforce.com edition, from: Contact Manager, Group, Professional, Enterprise, Unlimited, and Developer. Queues can be created for Leads, Cases, Knowledge article version, Service contract and custom object which not a child object in a master-detail relationship.

SOQL to query all queue:
Select g.Id, g.Name, g.Email from Group g where g.Type = 'Queue'

A queue can assign into one or  many objects, here SQOL to retrieve object assigned in a queue:
Select q.Id, q.QueueId, q.Queue.Name, q.SobjectType from QueueSobject q

Note: you can you Apex Data Loader to mass insert or mass update the data in Group and QueueSobject object.

Click here for Salesforce.com help link for queues overview.

Wednesday, November 14, 2012

Salesforce: Custom Button to pre-populate Fields

Out-of-the-box, when we create a new record from a parent object related list, Salesforce.com provide parent name pre-populated in child object. This is efficient and save time, user do not need to look for the parent record again.





This is good, but, often we need more fields to be pre-populated for some scenario and make our (read: Salesforce users) life easier :)
We can make this happen by create new custom button whether in related list or in page layout. In this sample, we'll use Account as parent and Opportunity as child.

NOTE: This is considered a URL hack and it is not supported by Salesforce. Using undocumented query strings is absolutely discouraged as Salesforce can change them at any time without notice.

Custom button in page layout
Go to Account object in Setup menu and choose Buttons and Links. Click New button and select option as screenshot below. Once button created, you need to add the button into Account page layout.


Custom button in related list
Go to Opportunity object in Setup menu and choose Buttons and Links. Click New button and select option as screenshot below. Once button created, you also need to add the button in Opportunity related list in Account page layout.





OK, now we understand how to create the custom button, but what is the URL??? Here we go...

If you click Opportunity button in related list, see the URL
https://na1.salesforce.com/006/e?retURL=%2F0019000000DjwR5&accid=0019000000DjwR5&RecordType=01290000000NLfk&ent=Opportunity

So, what is the parameters and values? Let's parse it:
https://{instance}.salesforce.com/{object_prefix}/e?retURL=/{!Object.Id}&accid={!Object.Id}&RecordType={RecordTypeId}&ent={object_name}

In this sample there is record type in Opportunity and we want to skip Record Type selection page when user click new Opportunity by populating Record Type Id in the URL. So, this would be the URL:
/006/e?retURL=/{!Account.Id}&accid={!Account.Id}&RecordType=01290000000NLfk&ent=Opportunity


Now, we want to pre-populate other field from Account. Here we go... you need to find out the Id of textbox from web browser, in page edit the record and right click at textbox then select Inspect element

Once you get the id, add it into the URL:
/006/e?retURL=/{!Account.Id}&accid={!Account.Id}&RecordType=01290000000NLfk&00N90000000iQg4={!Account.Hello__c}&ent=Opportunity


Custom object
Parameter for pre-populate for lookup to an custom object id different, see sample below:
https://na1.salesforce.com/a0E/e?CF00N900000022p5z=Object+2A1&CF00N900000022p5z_lkid=a0D90000001OPvT&saveURL=%2Fa0D90000001OPvT&retURL=%2Fa0D90000001OPvT

Let's parse it:
https://na1.salesforce.com/{object_prefix}/e?CF00N900000022p5z={parent_object_name}&CF00N900000022p5z_lkid={parent_object_id}&saveURL=/{parent_object_id}&retURL=/{parent_object_id}

Notice that parent name is CF00N900000022p5z and parent id is CF00N900000022p5z_lkid and a new parameter saveURL to redirect the page after user hit Save button.


Considerations
Before you add more and more fields pre-populated, please consider this:
  • Sometime, if field in child object is not edit-able, consider to use formula field in child object
  • If the field do not need to copy from parent, you can hardcode it into the URL
  • To pre-populate data with some logic, you need visualforce page with apex code.

Video
Video created by 'Christian Deckert' is simply good to guide you step-by-step in creating URL for your custom button.


Auto-save
Some of you may looking for a way to autosave the record, Salesforce used to support parameter save=1, but for security reason to prevent Cross-Site Request Forgery (CSRF), this parameter has been removed.
You may look for AJAX toolkit to update + save record from a button.

Tuesday, November 13, 2012

Field Tracking

Out-of-the-box, Salesforce.com provide field tracking for up to 20 fields for standard and custom object. For custom object, you need to enable it by edit the object enable "Track Field History".








Once enabled, you will find a button "Set History Tracking" in "Custom Fields & Relationships" related list. For standard object, it will be there by default.

From "Set History Tracking" button, select fields you want to track up to 20 fields and yay... DONE!!

But, for Long Text Area field, it will just show who changed the field and when, that's all, no more information about what is the prior value and new value :( :(

Using Workflow and Field Update we can achieve this:
1. Create another Long Text Area to hold the history, in this sample, let's call it Response History to store history of Response (a long text area field).

2. Create a workflow with criteria ISNEW() || ISCHANGED( Response__c ).

3. Create an immediate workflow action with field update to update Response History field using this formula: 

"Last Modified: " + LastModifiedBy.FirstName + ' ' + LastModifiedBy.LastName + ' ' + 
TEXT(DAY(DATEVALUE(LastModifiedDate))) + '/' + 
TEXT(MONTH(DATEVALUE(LastModifiedDate))) + '/' + 
TEXT(YEAR(DATEVALUE(LastModifiedDate))) + ' ' + 
CASE(LEFT(RIGHT(TEXT(LastModifiedDate),FIND(" ", TEXT(LastModifiedDate))-2),2), 
'00','08', 
'01','09', 
'02','10', 
'03','11', 
'04','12', 
'05','13', 
'06','14', 
'07','15', 
'08','16', 
'09','17', 
'10','18', 
'11','19', 
'12','20', 
'13','21', 
'14','22', 
'15','23', 
'16','00', 
'17','01', 
'18','00', 
'19','03', 
'20','04', 
'21','05', 
'22','06', 
'23','07','00')+ 
LEFT(RIGHT(TEXT(LastModifiedDate),FIND(" ", TEXT(LastModifiedDate))-4),6) 
+ BR() + "------" + BR() + 
PRIORVALUE( Response__c ) + BR() + 
Response_History__c

Please note this formula only work with user without daylight saving timezone, because it will manually parse the time from GMT to your timezone (in sample above to GMT+8), because as of now Salesforce.com do not have TIMEVALUE() function yet. Otherwise, you can only capture the date OR display it in GMT timezone.

Here is the screenshot of the result:



Monday, November 12, 2012

Salesforce: Master-Detail relationship


Some new Salesforce admins may confuse with the different between Master-Detail relationship with Lookup relationship, since both are used to link an object to another object, and you can use parent-child relationships in SOQL queries for both relationship.

But fundamentally, it is different between Master-Detail with Lookup relationship, few items you need to notice on Master-Detail relationship:
  1. When a record of the master object is deleted, its related detail records are also deleted.
  2. The owner field on the detail object is not available and is automatically set to the owner of its associated master record.
  3. The detail record inherits the sharing and security settings of its master record.
  4. The master object field is always required in the page layout of the detail record (in child object).
  5. By default, records can’t be re-parented in master-detail relationships. However, administrator can set to allow child records in master-detail relationships on custom objects to be re-parented to different parent records, by enabling Allow re-parenting check box in the master-detail relationship definition.
  6. You can define master-detail relationships between custom objects
  7. You also can define master-detail relationships between a custom object and a standard object, but the standard object cannot be on the detail side of a relationship with a custom object. In addition, you cannot create a master-detail relationship in which the User or Lead objects are the master.
  8. You can display detail object record as custom related list on master object page layouts.
  9. You cannot create tab for a child object
  10. You can use master-detail relationships to model many-to-many relationships between any two objects. Maximum 2 master-detail relationship from a custom object.
  11. If the object is master of 1 or more detail object, you only can have 1 parent object for that object.
  12. If you have Roll-Up Summary field in parent and summarized with particular child object, when you create / update that child record, it will "edit" parent record, so if any validation rule triggered, it will stop to save when create / update child record.

Salesforce: Assign using active assignment rule

In Case and Lead, the Salesforce admin can configure Assignment Rules to automatically assign a newly created Lead or Case to a specific User or Queue. This assignment rule will trigger upon the case or lead creation, regardless of how the case or lead is created. 

The rule will also run when editing the case or lead by clicking the Edit button, however, it will not run by clicking the pencil icon on a field (vote this idea) or edit from API (such as Workbench), so this rule is ideal only for manual record creation from Salesforce web user interface.

If necessary, you can set the "Assign using active assignment rule" checkbox visible, this will allow your users to manually enable or disable the assignment rule, the "Assign using active assignment rule" checkbox will be visible on creating or editing the record (from Edit button).

Lead

 Case

How to configured?
Go to Setup | Object Manager Leads or Cases | Page Layouts, then click the Layout Properties button, then enable Default.

Case page layout

Lead layout properties

Case layout properties


Once you have the assignment rule configured, the best practice is to hide that checkbox "Assign using active assignment rule", so the rule will always run. Although in some scenarios, even if you want to let the checkbox visible, set the Default enabled by default. This checkbox is located at the far bottom of the record page, so some users may not even notice it.


How to hide the checkbox "Assign using active assignment rule"?
Untick "Show on edit page" in the page layout properties. Even the checkbox is not shown, the assignment rule will work as configured, as long as the Default in the Lead or Case Assignment Checkbox is enabled in the layout properties



Reference:



Tuesday, November 6, 2012

Salesforce Hidden Features

Salesforce come with tons of features for administrator to make their live easy. But, do you know if there is more features which is not enable by default. You need to contact Salesforce support to enable it.

Here are 10 features a consultant usually needed for Salesforce implementation:


1. Ability to update Created Date and Last Modify Date

This sound crazy? But yes, sometimes you need this when do initial data migration to Salesforce. It called to enable "Audit Fields", read this article Considerations before having Create Audit Fields enabled.

2. Extended Mail Merge

With Extended Mail Merge, you can easily generate mail merge Word documents without dependency on Internet Explorer, certain Windows version, and Microsoft Word version, read this article Generating Mass Mail Merge Documents with Extended Mail Merge.

3. Person Account

For B2C companies, not all of your customer is company, instead of linking all contacts to an Account, you can request to enable Person Account. Linking all contacts to an Account will cause data skew - read this Avoid Account Data Skew for Peak Performance

4. Remove Price and Quantity field from Opportunity Product

Rather than always put 1 to quantity, you can request Salesforce support to remove price and quantity from opportunity product page layout.

5. Upgrade file attachment size beyond 5 MB

By default, user allowed to upload file to attachment maximum 5 MB per file, but we can request to Salesforce support to extend this limit to 10 MB up to 25 MB.

6. Email Relay

We can request all email send out from Salesforce.com via our email server for audit or security purpose or etc, reach Salesforce support to can enable this feature.

7. Encrypted Field

Some confidential data, like credit card number; need to be protect. User should not able to see the information unless he is the person needed. With enabling encrypted field, admin can manage only some users able to view sensitive data, but be aware that encrypted field is not searchable and the data length is shorter.

8. Multi Currencies

Multi national companies will get most advantages once multi currency enabled. We can use it in opportunity, forecast in reports.

9. Sandboxes
Number and type of sandbox is depend on your Salesforce edition you purchased, but you can purchase additional sandboxes as needed.

10. Defer Sharing Calculations
Deferring sharing calculation is ideal if you make a large number of changes to roles, territories, groups, users, portal account ownership, or public groups participating in sharing rules, and want to suspend the automatic sharing calculation to a later time. Group membership and sharing rule calculation are enabled by default. Read this document Defer Sharing Calculations.




Sunday, November 4, 2012

Inline Editing in Salesforce List View

Salesforce allow users to edit data directly in the record page payout, but your System Administrator need to enable inline editing, all fields can be edit with inline editing except for read-only and system fields. Editable fields display a pencil icon (Editable Field) when you hover your mouse over the field, while non-editable fields display a lock icon (Uneditable Field), double the field edit it, you can edit multiple fields before hit Save button, fields has been changed but haven't save will be show in orange color and bold. 

On top of inline editing in page layout, user also can do inline editing in the List View without any effort to write any code. Many system administrators may not aware of this feature and sometimes it will not work because of some conditions needed are not fit.



Hover mouse to editable field will show pencil icon


You can use it in picklist field as well


Edit date field for multiple record at once


Here are the items need to check for inline editing in page view:

1. Enable Inline Editing and Enhanced Lists

Go to Setup - Customize - User Interface












2. Edit permission

Make sure you have edit permission to the records and object.


3. Check if any Record Type for that object?

If the object has multiple record type, you have to filter only showing one record type by adding filter criteria. So if you have 3 record type for Contact, you need to create 3 view. 

Note: you should not have more than 1 record type in the record type filter, otherwise inline editing in List View will not work.

If there is no record type for that object, you can skip this filtering.


4. Do not add Filter Logic

You are not allowed to use Filter Logic to enable inline editing in list view. 



















5. Not for User object

As of now, this is not available for user object, please vote in IdeaExchange.


6. Edit multiple record at the same time

This feature is very nice if you need to edit many records to a same value. Select checkbox at the left of records and click pencil icon. Then select apply changes to all selected records.






7. Not for all fields
Some fields such as: Opportunity Amount, Stage, Forecast Category, Account Name in Opportunity is not working.


8. Not for user with Accessibility Mode enable

Make sure Accessibility Mode in user detail is disable.


9. Field Dependency

Field is not Controlling or Dependent field set in field dependency.


10. Page Layout
Make sure the field is available in a page layout, field not exist in page layout will be not work for list view inline editing.


ReferenceWhy can't I do inline editing in a List View?


Sunday, October 28, 2012

Can we set Salesforce.com standard field to be unique?

Salesforce.com administrators and consultants often get business requirement to set standard Salesforce.com fields to be unique. In some companies, we need to make sure every mobile phone in Contacts have to be unique (if it is not blank).

And as we known, until now, we are not able to set standard Salesforce.com field be unique, only custom field have this option.


So, any solution? Yes, there are few ways to get this done, from a simple one until a difficult one.


1. Trigger

Using trigger may be not a simple way, we need a developer who well understand Salesforce Apex Trigger. Developer need to write apex code in Developer instance or Sandbox instance, make sure the test method coverage above 75% and deploy it to production. 

Developer may be like this approach, although it is not something prefer by administrator. Trigger in Contact before insert and before update, query all Contact with mobile phone enter, if query result is > 0, add error and don't allow to save or update that Contact.


2. Using new custom field

Instead of using standard Salesforce.com standard field, using the same sample as above, we can build a new Mobile Phone field with field type = Phone. And hide standard Mobile Phone field from Field-Level Security (Prefer not just hide from Page Layout).

But, if this is an enhancement, it would be more effort to extract existing data to external file, verify there is no duplicate value and import the data back to the new fields. This even become worst, if the standard field has been used in many places, such as: reports, apex code, workflow, etc.


3. Workflow + Field Update

This is prefer option with less effort. Create a new custom field and enable Unique option then hide it from page layout. Create a workflow with criteria ISNEW() || ISCHANGED(MobilePhone). Create immediate workflow action to update the new field above. 

This option may be more simple, but the error message shown is not clear as it is not say what field is duplicate, but just inform it is duplicate with which record, example: "Duplicate value on record: John Wood". User do not know exactly what is duplicate between Contact working on with John Wood, if we have more than 1 field need to be set unique. 

Tuesday, October 23, 2012

Can we set Salesforce user password?

As Salesforce administrator, we often get question from our user, "can you check what is my password? " hmmmm, some users often think like some legacy applications, where system admin able to see or modify Salesforce password.

In Salesforce is different, it is so secure, system admin and everyone else not able to see or modify any user password. But, as the best practice, we offer to reset their password, and Salesforce will send email to the user with instruction to set new password by  their own, and it should works fine.


But again, some users (read: senior management) not really want to bother by checking email and so on, even the request is come from his/her secretary. So how? No problem, we can change user email to her secretary email, secretary confirm email change in her email (although Salesforce also will email to the original email say that the email has been changed to new one), and reset password. It works, yay!!! 


But, how to change back the user email to the original one? The senior management need to click a link again in her email (she may have hundreds or thousands email never read). Problem.


So, I just start think if there is an easy way to set user password without have to go through such complicated process? It is worst when the user is going to present something in 5 minutes and we do not have much time to do above process. So, can we set user password?


YES, it is possible, this function is not exist in Salesforce setup menu, but Salesforce is kind enough to provide system administrator with Developer Console. Yes, Developer Console is for developer as it named, but admin also can use it for other purpose, like set user password, yay!!!



How? It is easy, just few clicks, copy and paste a short code below will do. Navigate to your name and click Developer Console menu.  It will open new window, Debug | Open Execute Anonymous Window, copy and paste code below to the Enter Apex Code windows and click Execute button. System.setPassword('00550000000rlrX', 'hello123');


In this sample: 00550000000rlrX is the User Id, if you are Salesforce admin, you should now this Id well, and hello123 is the new password to set.

But, if you still too lazy to check the User Id manually, and you have the username, you can just copy and paste statement below into Apex code execute box:
System.setPassword([SELECT Id FROM User WHERE username='joe@lazy.com'].Id, 'hello123');

Below sample code to set password of all active user in one go:

List<User> userList = new List<User>();
userList = [SELECT Id from User WHERE IsActive = true];
for (User u : userList)
{
    System.setPassword(u.Id, 'hello123');
    System.debug('DONE: ' + u.Id);
}

You can modify the SOQL above as needed, example: only for profile = "Sales Rep".


All statements above is apex code, but we can utilize it for other productive work as needed. 




Sunday, October 21, 2012

Can we publish image from Salesforce.com ?

Kita dapat mem-publish suatu image untuk di-share ke internet untuk dapat di akses secara public, dari menggunakan menggunakan Flickr atau Photobucket dan lain sebagai nya. Tetapi sebagai pengguna Salesforce.com, apakah kita bisa mem-publish image yang ada di Salesforce.com?

Jawaban nya IYA, Anda bisa. Ada beberapa cara untuk sharing image yang ada di Salesforce.com, dari yang simple sampai dengan yang rumit. Beberapa di antara nya:

Attachment
Untuk meng-akses image dari suatu attachment yang tagged ke suatu object, dibutuhkan login ke instance Salesforce.com yang dapat meng-akses attachment tersebut. Jadi attachment bukan merupakan option untuk kebutuhan ini.

Static Resource
Diperlukan Visualforce page untuk meng-akses image yang ada di Static Resource. Jadi kita harus membuat Visualforce page untuk mengakses image yang ada di Static Resource, dari menu Setup - App Setup - Develop - Pages dan click button New.

<apex:page showHeader="false">
<apex:image url="{!$Resource.Logo_SFDC}"/>
</apex:page>

Perhatikan nama static resource yang digunakan di atas adalah Logo_SFDC. Dan pastikan Cache Control di set ke Public. Supaya Visualforce page yang di buat dapat di akses oleh public, kita perlu membuat Force.com Site baru (bila belum ada) atau masukkan Visualforce page tersebut ke Force.com Site yang sudah ada, contoh: http://johanmilis2-developer-edition.ap1.force.com/display_logo

Jadi, menyimpan gambar pada static resource dapat di akses oleh public, tetapi ini bukan cara yang simple dan membutuhkan bantuan Force.com Site.

Document
Anda dapat meng-upload gambar sebagai document di Salesforce.com dari dropdown Create New... atau dari tab Document (tergantung dari konfigurasi Salesforce.com Anda). Pastikan option Externally Available Image pada document yang mau di share diaktifkan. 

Image pada document dapat di akses langsung oleh public tanpa perlu login ke Salesforce.com, misal nya: https://johanmilis2-developer-edition--c.ap1.content.force.com/servlet/servlet.ImageServer?id=01590000000KZDM&oid=00D90000000H7oz


Ganti nama instance (dalam hal ini penulis menggunakan "my domain" johanmilis2-developer-edition--c.ap1) dengan instance Salesforce.com Anda, misal nya: na1, na2, na6, eu0, dll. Ganti nilai pada parameter id dengan Document Id yang mau di publish, biasanya di mulai dengan 015. Dan ganti nilai pada parameter oid dengan Organization Id Anda, biasanya di mulai dengan 00D. Anda dapat menggunakan image type JPG, GIF, PNG untuk kebutuhan ini. 


Jadi Document merupakan pilihan untuk share image yang di ada di Salesforce.com ke public dengan simple. 

Page-level ad