Sara Has No Limits

Good Programmers Evaluate, Simplify, Automate and Document

Clean Code: Writing Code for Humans


I am a proud monthly subscriber of the online training website Pluralsight. I cannot imagine staying up to date in this field without that subscription. Since my blog focuses on Salesforce concepts, I will tell you that Pluralsight offers several brilliant courses that cover Salesforce. But, this post is titled “Clean Code: Writing Code for Humans” by Cory House, a brand new course just offered on Pluralsight. The course is […]

Continue Reading →

Proper Use of ActionStatus component


In preparation for the Advanced Developer exam, I have been painstakingly going page by page through the Visualforce Developers Guide (which can be found online here). Almost every single person that has passed the exam has suggested that you become intimate with this document, but I wonder how many people truly are. I keep finding that the code listed in the tutorials does not work as it should. My last […]

Continue Reading →

Setting Tab Order – Use TabOrderHint instead of TabIndex

In the last few days, I have been preparing for the Advanced Developer Certification by going page by page through the recommended Salesforce Developers Guide. I was shocked when I received an error trying to save a sample page using the code supplied in the online guide (page 39). The sample page involved setting the tab order for fields in a form and the code referenced an attribute named TabIndex. […]

Continue Reading →

Avoid Recursive Triggers with Static Variables


A lot of different things happen when a trigger is executed, which can cause trigger code to be executed more than once per transaction. For example, before and after triggers are executed twice if fields are updated based on workflow rules. Additionally, your trigger code may modify records, which can cause the trigger to fire again. For example, if the following code is executed it can potentially cause a CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY […]

Continue Reading →

More about Web Services and Unit Testing


One of the limitations of Salesforce unit tests is that they do not make web service call-outs. So, how do you satisfy unit testing requirements for any apex code that does web service call-outs?  You have two options. Option 1: Programmatically generate a mock call-out In the following example, a class which implements HttpCalloutMock is used to create a fake response: Your unit test code will then invoke the test […]

Continue Reading →

More about Unit Testing


Even though you can create a valid unit test just using the testMethod keyword, Salesforce recommends that you also use the @isTest annotation at the class level and encapsulate multiple unit tests in a test class. By doing this, all your unit test code will not count against the 3MB code limit, which limits the total amount of code your org can produce. Additionally, all your code will be compliant […]

Continue Reading →

Dynamic Visualforce Components and Tips


Dynamic Visualforce Components Instead of markup, these components are designed in Apex Allows you to create pages that render based on a variety of states, such as user’s: Permissions Behavior Organization preferences Data attributes This can be useful when you need two users to view the same page, but customized for their needs. However, this should not be the main way a developer creates pages. These should only be used […]

Continue Reading →

Advanced VisualForce Controllers – Create a Wizard


Custom Apex Objects Developers can create their own Apex objects by defining them in Apex classes. Apex classes are helpful in creating wrapper classes for sObjects Other Controller Considerations Controller methods are generally defined as public. However, if you want to use a method as a webService, you must define it as global. Use Apex collection data types, such as “list” and “Set” when returning data from the database for […]

Continue Reading →

Updated Podcasts of Apex Training

UPDATE: According to Chris Barry , the instructor in these pod casts, Salesforce has removed them because they are now focusing on new/better low cost training. As soon as I learn more about what that is, I will post about it here. For anyone studying for the Salesforce Advanced Developer Certification, I strongly suggest you check out the following recently refreshed series of Podcasts posted on ITunes. They are recorded […]

Continue Reading →

Visualforce Custom Controllers


Custom Controller Code Used when there is a need to: Override existing functionality Make new actions available to a page Customize navigation Use HTTP callouts or web services Provide greater data access control on a page Custom Controller vs. Controller Extension – Custom controllers are used when the developer wants to start with a clean slate and have complete control over the functionality. Extensions inherit the functionality of the controller […]

Continue Reading →


Get every new post delivered to your Inbox.

Join 89 other followers