Development – Best Practices

Salesforce Logo A) Implement business rules using Validation Rules on the object instead of implementing them on presentation layer.
– This allows easy maintenance and minimal implementation effort.
– VF page respects all validation rules defined on Object. In case a validation rule fails to pass, error message can be thrown on the VF Page.

B) Add custom fields to the standard objects instead of adding a septate Custom object.
– Minimize the number of custom objects in the application. PE instance supports only 25 custom objects.

C) Use Record Types and multiple Page Layouts instead of creating multiple custom objects.
– Higher number of custom objects may discourage the customers to purchase the product especially in Professional Edition of

D) Wherever possible, define relationship between objects as Master – Child.
– This may significantly reduce the coding efforts and would also allow using the cross – referenced formulas to define the validation rules.
– SF would automatically implement the cascade delete on Child objects.
– Also, this would help in building reports.

E) Avoid making the main / central custom object of the application as Child in any relationship. Use normal Lookup relationship instead.
– SF doesn’t allow the Child object of a M – C relationship to be Parent of another object.
– If the main / central custom object is made a Child in any relationship, SF will not allow to create any relationship with this object as M – C.

F) Derived custom objects (created to resolve M – M relationship) may have M – C relation with both parents.
– Security permissions on the child object would be driven by parent.
– Also, data management will be easier since SF would automatically delete records from child when parent record is deleted.

G) Minimize the number of Tabs on the Application. Instead, use related lists on the parents objects per page layouts.
– Too many tabs in an Application may not be considered a good design.
– PE supports only 5 Tabs per Application.


About smattey

Sumit Mattey is the Leader, Cloud Technologist & Evangelist, Husband, Father and Fun Loving person. Currently working as - PROJECT MANAGER, R Systems Int'l Ltd.(Salesforce) Not simply defined by his career, Sumit lives with his family (whom he loves so much). He is an avid movie buff, a big book worm, a lover of food and beverage. While his schedule has not been forgiving as he'd like, he also enjoys doing photography with great outdoors and tries to hunt as often as possible.
This entry was posted in Cloud Computing, and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s