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
Sometimes we get a requirement in which we need to create OrderItem programmatically and we need to research a lot to know the required fields of Order Item.
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
Apex Code Snippet to Convert Blob into String Apex Code Snippet to Convert String into Blob
We get this requirement while coding several time to convert epoch time (Unix time) to Datetime. First thing, never store a epoch time in Integer and use Long always. Below given code can be used to convert into datetime: To get the epoch from a datetime variable you can just call the getTime() instance method:
Feel free to utilize this method and change as per your need:
It’s very usual to fall in such a requirement to execute apex scheduled job every 1 hour. The dirtiest way to schedule it 24 times at a specific time. But there is another very efficient way to run it each clock hour and can be achieved by just running it once using power of cron …
DESCRIPTION Tracing IP address of community is utmost requirement to achieve different goals like geo based technical support, spam protection and other security things. There are bunch of forum discussions related to this: https://developer.salesforce.com/forums/?id=9062I000000g56rQAA https://salesforce.stackexchange.com/questions/145145/how-to-get-ip-address-of-current-user-in-lightning-component https://salesforce.stackexchange.com/questions/246085/how-to-get-the-public-ip-address-of-current-user-in-lightning-component-hosted-o/246087 APPROACHES In order to solve this, simple approach is to get the IP address and store in any custom …
How to get IP Address of Community User – Guest and Logged in Customer User Read More »
This articles explains how can we authenticate in Box.com using JWT OAuth 2.0. Here is the API details in Box API documentation: https://developer.box.com/guides/authentication/jwt/without-sdk/ Box – Prerequisites Salesforce – Prerequisites Apex Code A). In following implementation, we are not using standard JWT and JWS because it throws error “Signature verification error. The public key identified by …
Box Authentication – Getting Access token Using JWT OAuth2.0 in Salesforce Read More »