4

Im creating a cutom object 'Custom Case' exact replica of Case object. Subject is hyperlinked to the Case detail view in the list view. But it is not hyperlinked in the detail view and edit mode. How to accomplish this in a custom object

2 Answers 2

2

To answer your question you can make a hyperlink on any field for any object using the formula field. You would make a formula field of type text, and use the HYPERLINK method

HYPERLINK(url, friendly_name [,target]) and replace url with the Web address, replace friendly_name with the link text, and, optionally, replace target with the window or frame in which to display the content.

See the documentation here

https://help.salesforce.com/HTViewHelpDoc?id=customize_functions_a_h.htm&language=en_US#HYPERLINK

I guess my question though is why you would create a custom object thats a replica of the case object? What is the use case. You are not leveraging a lot of some of the great Salesforce native functionality around cases that would take some serious customization to replicate.

1
  • you'd do something like this where you don't have the appropriate SF License to display the Object through a portal.
    – crmprogdev
    Nov 27, 2013 at 14:46
0

The Subject field in your mirror object needs to be created as a "URL" field. You'll then need to hook it up to the record. If you're using a trigger to populate the mirror object, you'd use code that looks something like this:

String sfdcBaseURL = URL.getSalesforceBaseUrl().toExternalForm();

System.debug('Base URL: ' + sfdcBaseURL );

Subject = sfdcBaseURL + '/' + CaseDetail.Id;
2
  • While I agree this would work, I would wonder why you would go through the trouble to do this when you could use a formula field to accomplish it with no code. Just thinking config over code is generally desirable. Nov 27, 2013 at 14:46
  • Mirror objects like this are typically created using triggers as part of an application. Have been doing a similar application myself to expose Events related to an Opportunity through a Portal using a HVCP license.
    – crmprogdev
    Nov 27, 2013 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .