12.07.2015 Views

Best Practices for Implementing Salesforce CRM - Cloud Experts

Best Practices for Implementing Salesforce CRM - Cloud Experts

Best Practices for Implementing Salesforce CRM - Cloud Experts

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Choose the right tools to customize and extend Sales<strong>for</strong>ce <strong>CRM</strong>As you work with Force.com sites, be aware of these considerations:• Public access permission settings control what public users can do on each site. Be sure to take extraprecautions when setting these permissions, including access to standard and custom objects.• Use login settings to let users register <strong>for</strong> and log in to your portal from your public Force.com site. Notethat self-registration is available only <strong>for</strong> customer portals, not <strong>for</strong> partner portals.• During your organization’s maintenance <strong>for</strong> major releases your sites will be unavailable.Developing custom business logic with Force.com code (Apex)Force.com code is an object-oriented programming language with domain-specific classes and methods. Itwas designed to integrate tightly with the Force.com database layer and other plat<strong>for</strong>m services and toexecute efficiently and safely in our multitenant cloud-based architecture.Because Force.com code uses a familiar Java-like syntax, seasoned developers will get up to speed quickly.And because Force.com code supports the common stored procedure and database programming idioms,it’s easy to write data-centric logic, such as triggers, that execute be<strong>for</strong>e or after records are inserted,updated, or deleted.With Force.com code, you can:• Attach custom logic to the fundamental database operations so that it executes whenever the operationexecutes, regardless of whether the operation originates in the UI or from the Web services API.• Modularize logic into Force.com classes that can be called from other Force.com classes and triggers, toreuse and standardize code.• Expose Apex classes as Web services that can be invoked from external systems, either publically orthrough secure access methods.• Create custom controller logic that works in conjunction with Force.com pages to manage userinterface behavior. For example, a Force.com controller can manage the flow from page to page inresponse to user input in a multi-step wizard.• Per<strong>for</strong>m complex validations across multiple objects. For example, if the user changes the stage on anopportunity, you can specify that the record must includes line items, at least one contact role, and atleast one quote be<strong>for</strong>e the record can be saved.• Create complex business processes not supported by workflow. For example, when a user creates alead record, you may want to check <strong>for</strong> duplicate leads. If you find dupes, you can prevent the recordfrom being saved.• Create custom transactional logic (database operations that affect multiple objects as a logical unit ofwork, not just with a single record or object). For example, if you build a custom work-order process,you may want to check that all child work orders are completed be<strong>for</strong>e updating the parent work order.• Per<strong>for</strong>m long-running calculations or business processes in an asynchronous or batch execution mode.These operations run in the Force.com service and can be initiated on demand or scheduled to run on arecurring basis through a job scheduler.• Integrate with external Web services using intuitive frameworks such as XMLStream, HTTP Classes,and WSDL2Apex.• Develop and execute test methods alongside your business logic that ensure your code continues towork as intended throughout the entire life cycle.BEST PRACTICE 5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!