Replace coma with new Line using Salesforce Apex
Sample Trigger:trigger AccountTrigger on Account ( before insert, before update ) { for ( Account objAcc : trigger.new ) { if ( String.isNotBlank( objAcc.Description ) ....
Sample Trigger:trigger AccountTrigger on Account ( before insert, before update ) { for ( Account objAcc : trigger.new ) { if ( String.isNotBlank( objAcc.Description ) ....
Sample Code: Apex Class: public with sharing class ContactController { @AuraEnabled( cacheable=true ) public static List < Contact > fetchContacts(){ return [ SELECT Id, Name, ....
Sample Apex Code:String searchQuery = 'FIND {test} IN Name FIELDS RETURNING Account( Id, Name ), Contact( Id, Name )';List < List < sObject > > searchResult = search.query( searchQuery );List ....
Get the Tenant Id, client secret value(not the id). Sample Code: String strEndPoint = 'https://login.microsoftonline.com/{Enter_Tenant_Id}/oauth2/v2.0/token'; String strBody = 'grant_type=password&scope=https%3a%2f%2fgraph.microsoft.com%2f.default'; strBody += '&client_id={Enter_Client_Id}&client_secret={Enter_Client_Secret}'; strBody += '&username={Enter_Username}&password={Enter_Password}'; HttpRequest req = new HttpRequest(); ....
Get the Tenant Id, client secret value(not the id).Sample Code:String strEndPoint = 'https://login.microsoftonline.com/{Enter_Tenant_Id}/oauth2/v2.0/token';String strBody = 'grant_type=client_credentials&scope=https%3a%2f%2fgraph.microsoft.com%2f.default';strBody += '&client_id={Enter_Client_Id}&client_secret={Enter_Client_Secret}';HttpRequest req = new HttpRequest();req.setEndpoint( strEndPoint );req.setMethod( 'POST' );req.setHeader( 'Content-Length', String.valueOf( strBody.length() ) ....
Sample Code: Apex Class: public class AccountController { @AuraEnabled( cacheable = true ) public static List< Account > fetchAccounts() { return [ SELECT Id, Name, Industry FROM Account LIMIT 10 ....
In the below implementation, I have created Custom quick action with Lightning Web Component to forward the records(Accounts) to the target org. Pre-requisite: Salesforce to Salesforce Setup: https://www.infallibletechie.com/2012/03/salesforce-to-salesforce-connection-2.html Sample code: ....
Sample code: Apex Class: public class MassApprovalController { @AuraEnabled( cacheable = true ) public static List < MassApprovalWrapper > fetchPendingApprovalRecords() { List < ....
System.QueryException: unexpected token: '<EOF>' exception in Salesforce occurs due to Malformed Query String. If you are dynamically building the query, use System.debug() to print the query. Generated Debug log to ....
Page Block Table, Data Table, Data List and Apex Repeat can be used to render list in Visualforce page. Check the sample code for reference. Sample Code: Visualforce Page: <apex:page ....