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
1
vote
3answers
2k views

Which is the best data loader for Salesforce? [closed]

Over time, I have come across three data loaders for Salesforce... Apex Data Loader, Jitterbit Data Loader, and dataloader.io to name a few. Are there any more data loaders for Salesforce? Which is ...
34
votes
6answers
5k views

What is a good set of coding conventions for Salesforce development?

I've looked around in the Apex and Visualforce developer guides and around the web and can't seem to find any coding conventions out there. The Apex Dev guide has a section on Naming Conventions that ...
5
votes
1answer
12k views

Structure for classes to call inner or sub classes

I don't have a Java background and am working on a class where I'd like to be able to call inner classes from withing methods of the outer class. As much of Apex is implicit and I'm still learning, I ...
6
votes
2answers
476 views

If sharing rules are used should a where clause still be applied to a SOQL query?

If a portal user only has permission to access a subset of records, defined via sharing rules, should the SOQL still use a WHERE clause, or should it be left off of the query? List<MyObject__c> ...
10
votes
4answers
13k views

Number field without comma (thousands separator)

What is the Best Practice to display number field without a thousands separator (comma or period, depending on locale)? I have rejected the following ideas: Text field, because I have to write ...
8
votes
4answers
2k views

Salesforce Integration + Streaming API

The Salesforce Integration Patterns workbook suggests the use of the Streaming API to give an customer service agent a real time notification of a client payment. However the Streaming API is limited ...
0
votes
3answers
74 views

How to fetch input from many non-registered users?

Let's say I have a school that uses Salesforce to track its students data. Now I want to add the functionality that the 40+ teachers can enter the grade to the students records. Of course I cannot ...
1
vote
2answers
683 views

Naming convention [duplicate]

What is the best naming convention developers around have been using for defining Record names to maintain uniqueness that can also be searched easily : foreg: opportunity name : Opportunity ...
2
votes
1answer
638 views

Deploy long assignment rule from sandbox to production?

What is the easiest way to deploy long (~100 steps) assignment rule from sandbox to production? Edit: Currently it is not possible to automate this. What I am looking is for best practices to reduce ...
7
votes
3answers
4k views

Efficient way to create master-detail records

I am working on creating records for a custom object type in Salesforce. There is also a line item object which has a master-detail relationship. Invoice = Master Invoice Line Item = Detail I am ...
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
142 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 ...
32
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, ...
64
votes
6answers
18k 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
10k 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
366 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 ...