Blogs
-
Comparing Object Types in Apex
At some stage, every developer will require verifying whether a generic SObject corresponds to a specific concrete SObject type. This scenario commonly arises when inspecting the owner of a custom object or the who.id and what.id of objects containing polymorphic keys like Task. Developers might consider using the Apex instanceof keyword for this verification. However,…
-
Simplified Approach To Apex Test Code Coverage
In Salesforce.com, Apex developers need to ensure the existence of 75% test code before deploying their code to a production environment. This requirement serves as a valuable measure ensuring that your code remains self-sufficient over time. Moreover, it automatically identifies any potential code-breaking changes within your orgs in the future. Salesforce.com requires Apex coders to…
-
Parameter Passing In Apex: By Reference Vs. By Value
We’re updating the Apex documentation regarding the concept of “pass by reference.” Here’s an in-depth explanation of the reasons behind this modification. We’re updating the Apex documentation regarding the concept of “pass by reference.” Here’s a comprehensive explanation detailing the rationale behind this modification. The current Apex documentation suggests that non-primitive variables are passed by…