johnsontitusMay 25, 20201 min readData loader for bulk testingThe data loader is used to insert, update, or delete large amounts of data at once. This is great for bulk testing parts of your code...
johnsontitusMay 25, 20203 min readDevelop on a Sandbox or Dev org?Perhaps the single most important factor in Force. com development is whether you're developing software for a specific organization or...
johnsontitusMay 25, 20201 min readDML operations: Complete or none option or Partial optionApex offers two ways to perform DML operations: using DML statements or Database class methods. DML statements are more straightforward...
johnsontitusMay 24, 20201 min readUse cases addressed with Apex/Lightning componentUse case - Lightning component listing product information about max discount allowed for each product. This field should be available...
johnsontitusMay 24, 20201 min readApex REST CalloutsAuthorize the endpoint URL of the callout: From Setup, enter Remote Site Settings in the Quick Find box, then click Remote Site Settings....
johnsontitusMay 24, 20201 min readSOQL QueriesRetrieve records with locations saved in geolocation or address fields as individual latitude and longitude values by appending...
johnsontitusMay 24, 20201 min readHow multiple currencies are managed?If your organization uses multiple currencies, the currency of the master record determines the currency of the roll-up summary...
johnsontitusMay 24, 20201 min readTo provide sObject details and their fields/* //to return a map of all sObject names(Keys) to sObject tokens(values) Map<String, Schema.SObjectType> globalDescribes =...
johnsontitusMay 23, 20201 min readGovernor LimitsSOQL queries: 100 Number of SOQL results: 50000 SOSL queries: 20 DML Statements: 150 Number of DML results: 10000
johnsontitusMay 22, 20201 min readPackage DevelopmentPackage development, every customization is managed as a single, seperately-deployable unit and all changes are tracked in source...
johnsontitusMay 21, 20202 min readBest Practices for Unit testingUnit tests are class methods that verify whether a particular piece of code is working properly. Unit test methods take no arguments,...
johnsontitusMay 21, 20201 min readUpserting RecordsThis example uses upsert and an external ID field Line_Item_Id__c on the Asset object to maintain a one-to-one relationship between an...
johnsontitusMay 21, 20201 min readUsing Joins in SOQLSemi-Joins with IN: Eg, query using objects - Account and Opportunity, SELECT Id, Name FROM Account WHERE Id IN ( SELECT AccountId FROM...
johnsontitusMay 21, 20201 min readData Quality ManagementTo return duplicate Account/Contact/Lead names: select name, count(id) from <Account/Contact/Lead> group by name having count(id) > 1 To...
johnsontitusMay 21, 20201 min readUse Apex Scheduler for regular maintenance tasksTo invoke Apex classes to run at specific times, first implement the Schedulable interface for the class. Then, schedule an instance of...
johnsontitusMay 20, 20201 min readApex as a Web ServiceUse case: By using one interface, call center representatives can view and update case records in Salesforce and access internal...
johnsontitusMay 20, 20203 min readConsiderations whilst writing Visualforce pageUsing ApexPages.message to display error message for users User custom controller when the page needs to be run in system mode A...
johnsontitusMay 20, 20202 min readBatch Apex for processing huge number of recordsIt breaks down a huge batch into manageable chunks. Real life use - a data cleansing operation that goes through all Accounts and...
johnsontitusMay 19, 20201 min readPublishing & Subscribing to Platform EventsLightning component uses empApi component to subscribe and receive event messages. External clients can subscribe to events using CometD....
johnsontitusMay 18, 20201 min readTo load test data using csv fileSave the csv file as a static resource. In the test class, use the method: List<sObject> ls = Test.loadData(<ObjectType>.sObjectType,'<na...