Questions tagged [bestpractice]

Referring to the use of recognized community and platform best practices. May relate to all areas of lifecycle and all development and administration activities.

Filter by
Sorted by
Tagged with
4
votes
4answers
21k views

Calling Apex Class from Custom Button, And Then Refreshing List View

I have added a Custom Button to the List View of the Custom Object. What is the best practice of calling an Apex Class on click of the Custom Button, and refresh the List View after execution of the ...
1
vote
5answers
2k views

Tracking Custom Field History

What is the best practice to track Custom Fields' history on Custom Objects? Edit: Also, is there any way to include Field History in Reports?
34
votes
1answer
25k views

Writing Test Classes for Apex RestService

I was writing test classes for my apex Rest Service that i had built for an ipad app. I noted very interesting things while experimenting.Before anything i just did a google and found an interesting ...
4
votes
2answers
2k views

SOQL inline query vs dynamic query

I just wanted to know weather to use inline query or dynamic query as my daily practice. I know in some cases we have to use dynamic query. But as routine practice which one to use. Any thoughts?
4
votes
2answers
246 views

Web2Case & HTML 4 Id & Name compliance

I need to provide a webteam with HTML for a web2case form, the issue is that they are sticklers for compliance and insist that I provide them with HTML4 compliant code. Unfortunately the auto-...
2
votes
4answers
1k views

Need help in my attempt to follow a 'best practice' for writing triggers

I have read that it is a considered a best practice when writing a trigger to have as little code as possible in the trigger itself, and to instead call a class from the trigger. I wrote a trigger ...
7
votes
2answers
141 views

How does Salesforce recommend you log in to a customer's org when doing custom work for a client?

Every now and then I'm asked to do custom work in an org that I'm not a part of. I was wondering if there is some sort of best practice around getting in to do work temporarily. The options as I see ...
31
votes
2answers
12k views

Post Sandbox Refresh Steps

What steps should be taken after a sandbox refresh to avoid filling up the sandbox storage, sending emails, or outbound messages? I'm looking for steps to take such as disable scheduled Apex jobs, ...
63
votes
5answers
17k views

What is a good set of naming conventions to use when developing on the Force.com platform?

I've looked in the Apex developer's guide and a saw the Naming Conventions section which has basically only has this: We recommend following Java standards for naming, that is, classes start with a ...
31
votes
8answers
9k views

Use of @IsTest versus testMethod and location of test methods in classes

Is there any advantage to using the older testMethod keyword to identify test methods or is it better to use the @IsTest annotation? Does the location of these test methods have any significance? E.g....
3
votes
3answers
4k views

Using cases to manage and track internal SF tasks?

We have multiple administrators and or power users performing various designated tasks and want to use cases to manage, track, report and document. Anyone have any suggestions or best practices to ...
17
votes
7answers
362 views

How can I build an app for a company that has two very distinct types of customers?

I am working on building an app for a startup company on the Force.com platform, and I am struggling to find the best way to set up and distinguish between two very distinct customer types. The ...