Saturday, April 23, 2022

Custom settings vs Custom Metadata

 Custom settings are similar to custom objects and enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user.

All custom settings data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database. This data can then be used by formula fields, validation rules, flows, Apex.

Custom metadata is customizable, deployable, packageable, and upgradeable application metadata.


Monday, April 11, 2022

Salesforce Source-driven Development

 In source-driven development, the source is organized into artifacts based on group features or customizations that are delivered together. Salesforce DX incorporates the artifact-based approach to organizing the source. 

There is the ability to shift the source of truth from the org to a version control system (VCS), along with the use of popular collaboration technologies including Git and other test-build automation tools.

A Salesforce DX project is a local directory structure of your metadata in source format. It lets you develop and test with Salesforce DX tooling.

Salesforce DX allows developers to use Git and source repositories when doing any sorts of development on Salesforce platform.

Scratch orgs are a central feature of Salesforce DX. The Scratch org is a source-driven and disposable deployment of Salesforce code and metadata.

Dev Hub allows you to create and manage scratch orgs. It is also essential create and manage second-generation packages, and use Einstein features.




Wednesday, March 30, 2022

Salesforce Vlocity Dataraptor

 Vlocity DataRaptor moves data into and out of Vlocity applications. It's commonly referred to as an extract, transform, and load application.

DataRaptors allows you to read and write data to and from your Salesforce org.

 There are four types of DataRaptor: 

Turbo Extract, Extract, Transform, and Load.

Turbo Extract: Read data from a single Salesforce object type, with support for fields from related objects. Then select the fields to include. Formulas and complex field mappings aren’t supported.

Extract: Read data from Salesforce objects and output JSON or XML with complex field mappings. Formulas are supported. We can data from one or more Objects.

Transform: Perform intermediate data transformations without reading from or writing to Salesforce. Formulas are supported.

Load: Update Salesforce data from JSON or XML input. Formulas are supported.

With DataRaptor:

  • No coding is required because it abstracts queries.
  • Any DataRaptor can be saved, exported, and reused.

Monday, March 21, 2022

Salesforce Content Security Policy

 The Lightning Component framework uses Content Security Policy (CSP) to impose restrictions on content. 

The main objective is to help prevent cross-site scripting (XSS) and other code injection attacks.To use third-party APIs that make requests to an external (non-Salesforce) server or to use a WebSocket connection, add a CSP Trusted Site.

CSP is a W3C standard that defines rules to control the source of content that can be loaded on a page. All CSP rules work at the page level and apply to all components and libraries.

When you define a CSP Trusted Site, the site’s URL is added to the list of allowed sites for the following directives in the CSP header.

connect-src

frame-src

img-src

style-src

font-src

media-src


This change to the CSP header directives allows Lightning components to load resources, such as images, styles, and fonts, from the site. It also allows client-side code to make requests to the site.


Note: 

  • LEX - CSP header is approved only for your organization’s Lightning Experience.
  • Communities - CSP header is approved only for your organization’s Lightning Communities.
  •  You can’t load JavaScript resources from a third-party site, even if it’s a CSP Trusted Site. To use a JavaScript library from a third-party site, add it to a static resource, and then add the static resource to your component. After the library is loaded from the static resource, you can use it as normal.


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. 


ES12 new Features