How to check Person Account is enabled in Salesforce org or not using Apex
If Person Account is enabled then there must be a field on Account object called: isPersonAccount. We simply need to check if exists as below. Method 1 METHOD 2
If Person Account is enabled then there must be a field on Account object called: isPersonAccount. We simply need to check if exists as below. Method 1 METHOD 2
ERROR DESCRIPTION WORKAROUND Follow us on LinkedIn: Click here
Introduction Query on external object is supported with some limitation. Here is Salesforce help article: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_limits.htm Sample Query SELECT Id, Name__c, OrderNumber__c FROM ExternalOrder__x WHERE Name__c LIKE ‘%Software%’ Additional Notes
If you are using Digital Engagement also called Messaging of Salesforce, you may come up with a requirement to create messaging user record automatically. Here are key fields that we need to provide while creating the messaging user. Given example is to be used in Apex but same can be used in flow: For more …
Create Messaging User for WhatsApp Channel in Salesforce Read More »
GOAL To be able to create custom label along with translation programmatically. SOLUTION We can use tooling API to create the custom label and its translation as below. The Master label is stored in External String and translation is stored in ExternalStringLocalization Request to create master label: Endpoint Payload Response We can grab the Id of Master Label …
Create and update custom labels using Tooling API Read More »
If you are using Salesforce Community and you have network Id of the community but I don’t know how to get Base URL of the community. Here is a way to get the community base URL using its id in apex: Usage: Id communityId = Network.getNetworkId(); getCommunityURL(communityId);
In this blog, we will discuss on how to invoke a lightning Auto launched flow from the apex class. 1. It works only with autolaunched Flow. 2. Use the start method in the Flow.Interview class to launch an autolaunched flow or user provisioning flow from Apex. 3. In this example, we will use a visualforce page where flow will be invoked …
Using Describe Method: Consideration Notes: Just a query – After Spring 20 Consideration Notes
Most efficient way of identifying the type of org (Production or Sandbox) via Apex code: Actually we can query this detail from Organization object as below: On the top of this, we can build our own service method like below:
Apex Code Snippet to Convert Blob into String Apex Code Snippet to Convert String into Blob