Blogs

  • Convert an APEX Trigger into a Scheduled Batch Update

    PROBLEM STATEMENT Goal is to use a Batch Class as scheduled job as well. SOLUTION Then, add a Schedulable execute method that executes the Batch The anonymous apex will start a schedulable job with the desired cron expression. When the job starts, its execute(SchedulableContext sc) method is called that then starts the batch job Finally,…

    Read more…

  • Conditional display in LWC through lwc:if, lwc:elseif, and lwc:else

    Previously, to conditionally render HTML, we employed the if:true|false directive within a nested <template> tag encompassing the conditional content. However, the Spring ’23 release introduced new conditional directives – lwc:if, lwc:elseif, and lwc:else – enabling Conditional Rendering in LWC. This blog post delves into these directives and their superiority over the legacy if:true and if:else…

    Read more…

  • Difficulty in unit testing, simulating callouts, and execution under a specific user context

    Background I’m building multiple business applications within a community, and these apps heavily depend on making callouts to an ERP system for data verification, retrieval, or pushing data. To properly test the code in these applications, it’s crucial to run unit tests as community users. I’m utilizing the mock response interface to simulate API responses…

    Read more…