Friday, March 4, 2022

Error : " Installing plugin @salesforce/lwc-dev-server... ! " when installing in my Visual Studio in Windows

Steps to fix the above Issue:

====================

1. Installation of Nodejs software and disconnect from office network VPN (if connected).

2. >Install node gyp by running 

      npm install -g node-gyp

    >In command prompt or whatever command-line interface you use.

3. And then after that, you can run 

     npm install --global --production windows-build-tools

4. And finally tried the below command it worked after 2 3 times..

     sfdx plugins:install @salesforce/lwc-dev-server

Thursday, January 20, 2022

Formula BestPractices

Tip 1: Put Every Function on a Separate Line

Place each function on its own line makes the formula easier to read and troubleshoot.

IF(AND(ISBLANK(myDate_c),active_c=true),"Missing Date","Not Applicable")

IF(

AND(

ISBLANK(myDate_c),

active_c=true

),

"Missing Date",

"Not Applicable"

)

Tip 2: Indent Sections Within Parentheses

When your formula involves multiple functions, indentation helps visually isolate each function and makes it easier to identify errors, such as misplaced characters.

In this example, with indentation, you see that the bulk of the formula sits within a single IF statement and that the AND statement contains two functions. Inside the AND statement, the function ISBLANK is enclosed in parentheses.

IF(

  AND(

    ISBLANK(myDate_c),

    active_c=true

  ),

  "Missing Date",

  "Not Applicable"

)

Indentation can also help you zero in on mistakes. 

IF(

AND(

ISBLANK(myDate_c)

),

active_c=true

),

"Missing Date",

"Not Applicable"

)

The indented layout makes it easy see the formula’s structure. You can quickly find and remove the extra character so that the AND statement is correctly formatted.


IF(

  AND(

    ISBLANK(myDate_c)

    ),

    active_c=true

  ),

  "Missing Date",

  "Not Applicable"

)

Tip 3: Write Statement and Function Names in Uppercase

All the examples here use uppercase letters for statement and function names, such as IF, AND, and ISBLANK.

Tip 4: Handle Null and Required Input Field Values

These examples reference a field called myDate__c and use the ISBLANK check to confirm that the field is populated. It’s important to verify the contents of any field in a formula. Without this verification, a formula can fail. 

IF(

  AND(

    ISBLANK(myDate__c),

    ISBLANK(mySecondDate__c),

    active__c=true,

    mySecondDate__c > myDate__c

  ),

  "Missing Date",

  "Not Applicable"

)

Friday, January 14, 2022

Salesforce API's

 Application Programming Interface(API), which is a software intermediary that allows two applications to talk to each other.

Each time you use an app like Facebook, send an instant message, or check the weather on your phone, you’re using an API.

Below are some of the APIS that we use in Salesforce.

API

When to Use

SOAP API 

Integrate your org’s data with other applications using standard SOAP protocols. 

REST API 

Access objects in your org using standard REST protocols. 

Metadata API 

Manage customizations in your org and build tools that manage your metadata model. 

Tooling API 

Build custom development tools for platform applications. 

Marketing Cloud API 

Expose Marketing Cloud capabilities with the REST API and get comprehensive access to most email functionality with the SOAP API. 

Bulk API 

Load, delete, and perform asynchronous queries on large data sets. 

Streaming API 

Send and receive notifications securely and efficiently. Notifications can reflect data changes in your org, or custom events. 

Connect REST API 

Build UI for Commerce, CMS-Managed Content, Experience Cloud Sites, Files, Notifications, Topics, and more. 

Mobile SDK 

While it’s technically a software development kit, it’s worth including here. Integrate Native or Hybrid mobile apps directly with Salesforce. 


Tuesday, December 28, 2021

Batch Apex

Batch Apex is asynchronous execution of Apex code, specially designed for processing the large number of records and has greater flexibility in governor limits than the synchronous code.

Need of Batch Apex:

  • When you want to fetch thousands of records or fire DML on thousands of rows on objects it is very complex in salesforce and it does not allow you to operate on more than certain number of records which satisfies the Governor limits.
  • But for medium to large enterprises, it is essential to manage thousands of records every day. Adding/editing/deleting them when needed.
  • Salesforce has come up with a powerful concept called Batch Apex. Batch Apex allows you to handle more number of records and manipulate them by using a specific syntax.

Database.Batchable interface has the following three methods that need to be implemented.

start() :

It collects the records or objects to pass to the interface method execute(), call the start() at the beginning of a BatchApexJob. This method returns either a Database.QueryLocator object that contains the records passed to the job.

execute() :

To do the required processing of each chunk of data, use the execute method. This method is called for each batch of records that you pass to it. This method takes a reference to the Database.BatchableContext object.

finish() :

To send confirmation emails or execute post-processing operations, we use finish(). This method is called after all batches are processed.

Note: The order of execution of batches is not guaranteed.

While Implementing the Batch Programming, we have to follow the below steps.

	Step 1: Create a Global Class, which should be implemented by the
		"Database.Batchable" Interface.
			
		Syntax:
			Global Class <ClassName> Implements Database.Batchable<SObject>
			{
				// Write the Logic..
			}
			
	Step 2: Provide the Implementation for the Interface Methods.
		
		Syntax:
			Global Class <ClassName> Implements Database.Batchable<SObject>
			{
				Global Database.QueryLocator Start(Database.BatchableContext <refName>)
				{
					// Write the Start Method Logic..
				}
				
				Global void Execute(Database.BatchableContext <refName>, List<SObject>
																recordsToProcess)
				{
					// Write the Execute Method Logic..
				}
				
				Global void Finish(Database.BatchableContext <refName>)
				{			
					// Write the Finish Method Logic..
				}
			}

	Step 3: Invoke the Batch Class.
			
			Step 1: Create the Object of the Batch Class.
				Ex:
					<BatchClassName> <objectName> = new <BatchClassName>();
					
			Step 2: Invoke the Batch Class by using "Database.ExecuteBatch()" method.
				Ex:
					ID jobId = Database.ExecuteBatch(<batchClassObjectName>);
					
								(OR)
								
		ID jobId = Database.ExecuteBatch(<batchClassObjectName>, batchSize);
					
			Ways to Invoke the Batch Class:
			-------------------------------
			1. We can Invoke from Execute Anonymous Window.
			2. We can invoke from Another Batch Class.
			3. We can invoke from "Visualforce Page".
			4. We can Schedule the Batch Job.

	Step 4: Track the Status of the Batch Class.
			
			Case 1: Track the Status from the Setup Wizard.
					Setup --> Monitor --> Jobs --> Apex Jobs.
					
			Case 2: Get the Status through Programming by Querying from "AsyncApexJob"
					object.
					
					AsyncApexJob jobDetails = [Select id, status, totalJobItems,							jobItemsProcessed,numberOfErrors, CreatedBy.Email from AsyncApexJob
														Where id =: <batchJobId> ];


Tuesday, November 23, 2021

Contract Testing

 Contract testing is a methodology for ensuring that two separate systems (such as two microservices) are  compatible and are able to communicate with one other.

 It captures the interactions that are exchanged between each service, storing them in a contract, which can then be used to verify that both parties adhere to it.

Contract testing goes beyond schema testing, requiring both parties to come to a consensus on the allowed set of interactions and allowing for evolution over time.

Pact is a code-first consumer-driven contract testing tool, and is generally used by developers and testers who code. The contract is generated during the execution of the automated consumer tests.

A major advantage of this pattern is that only parts of the communication that are actually used by the consumer(s) get tested. 

This in turn means that any provider behaviour not used by current consumers is free to change without breaking tests.

Saturday, September 25, 2021

Keycloak

 Keycloak is an open source Identity and Access Management solution targeted towards modern applications and services.

Keycloak offers features such as Single-Sign-On (SSO), Identity Brokering and Social Login, User Federation, Client Adapters, an Admin Console, and an Account Management Console.

Below are keycloak features:

1)Multiple protocols support

2)SSO support

3)Offers Web based GUI

4)External Identity Source Sync

In case when your client currently has some type of user database, Keycloak allows us to synchronize with such database. By default, it supports LDAP and Active Directory but you can create custom extensions for any user database using Keycloak User storage API.

4)Identity Brokering

Keycloak can also work as a proxy between your users and some external identity provider or providers. Their list can be edited from Keycloak Admin Panel.

5)Social Identity Providers

Additionally, Keycloak allows us to use Social Identity Providers. It has built-in support Google, Twitter, Facebook, Stack Overflow but, in the end, you have to configure all of them manually from admin panel. 

6)Customizations

Currently  Keycloak supports following distributions.

1)server

2)Docker Image

3)Operator

Link: https://www.keycloak.org/

Saturday, July 31, 2021

Core Banking

 Core banking is a banking service provided by a group of networked bank branches where customers may access their bank account and perform basic transactions from any of the member branch offices.

Core banking systems typically include deposit, loan and credit-processing capabilities, with interfaces to general ledger systems and reporting tools.

Open source Technology in core banking solution or software can help banks to maintain their productivity and profitability at the same time.

Below are some of the Core Banking Software's in market:

  • CRMNEXT. 
  • Fisa Group. 
  • Finastra
  • Turnkey Lender
  • Q2eBanking
  • nCino
  • Temenos

ES12 new Features