Posted on May 29, 2026 2 Comments
Create EmpConnector connection The first thing is to create a configuration that on startup will connect to the EmpConnector and start listing for incoming events on a specific topic. 1. Set all your Bayeux Parameters (bayeuxParameters) 2. Create EmpConnector connection (empConnector) 3. Start listening to topic (startAndPublishAsyncEventToExchange) 4. Adding listeners to the topic (startAndPublishAsyncEventToExchange) Basic […]
Posted on March 26, 2026 Leave a Comment
We can run 3 batch jobs sequentially by incrementing the jobCounter and passing the integer (job index) into the batch scope This can be increased to any amount of batch jobs, the problem I solved was able to update the Contact and disable Users in the same code running as different batch job. As you […]
Posted on January 18, 2026 Leave a Comment
Setup a method to send Aync call to Heroku, add ‘?_HttpMethod=PATCH’ to the path to notify Heroku it’s a patch request Spring controller checks the RequestParam _HttpMethod to see if it’s a POST or PATCH request
Posted on June 14, 2026 Leave a Comment
Exporting salesforce metadata to csv, iterate through SObject and fields and show Label, API Name, FLS, Custom/Standard field. Output
Posted on June 4, 2026 Leave a Comment
Sometime a jar is not available via Maven Central Repository and you need to load a jar from your local filesystem. Copy the jar file to a lib directory in your project. Execute the following command via command line Add the following to maven pom.xml
Posted on May 16, 2026 Leave a Comment
Create a new Planform Event Object and give it a name App Metadata (App_Metadata__e) which will also be the name of the topic. Create some fields you that you would like to listen to. In Apex add the following event Build event payload Publish Event to eventBus Now let’s create our event listen to subscript […]
Posted on February 9, 2026 1 Comment
Trying to mock a actual database query can be hard. Using the fflib_Mocks jar you can generator Selector Mocks: More info here: https://github.com/financialforcedev/fflib-apex-mocks 1. Create interface class that extends fflib_ISObjectSelector to mock the Selector 2. Create interfacemocks.properties file in root of your project 3. Run java -jar apex-mocks-generator-4.0.0.jar “{path}/src/classes” “{path}/interfacemocks.properties” “fflib_Mocks” “{path}/src/classes” “30.0” to generate mocking […]
Posted on February 8, 2026 2 Comments
There are different ways you can use salesforce to attach a file to an SObject using Chatter. Apex Code Chatter REST Api Some limitations using this is using Blob for version.VersionData = attachment.Body; will run into Apex String length exceeds maximum: 6000000. Chatter Rest API POST https://cs43.salesforce.com/services/data/v35.0/connect/communities/0DB63000000003jGAA/chatter/feed-elements/batch HEADER Authorization Bearer {sessionToken} Content-Type […]
Posted on September 22, 2025 1 Comment
1. Setup Application 2. Setup Scheduler 3. Add Spring Boot dependency 4. Add Procfile 5. Scale Heroku worker 1. Setup Application 2. Setup Scheduler 3. Add Spring Boot dependency 4. Add Procfile 5. Scale Heroku worker
Posted on September 8, 2025 Leave a Comment
Step 1: Setup Bing BulkServiceManager Configuration Step 2: Setup Bing Adwords Service