Friday, January 17, 2025

All salesforce Command

 Use the CLI.

A. In the terminal, run the following commands:

            ● sf version

            ● sf org list

            ● sf org list limits

            ● sf org list limits | grep FileStorageMB

            ● sf commands

Create Project in Keyboard

Using your keyboard: Ctrl+Shift+P (Windows) / Cmd+Shift+P (Mac)



Sunday, June 30, 2024

Apex Class

 

Class

public class AccountUtils {

    public static list<Account> accountsByState(String state){

        List<Account> listAcc=[select ID,name from Account where BillingState=:state];

        return listAcc;        

    }

}



Developer console

list<Account> lacc=new list<Account>();

lacc=AccountUtils.accountsByState('NC');

system.debug('**lacc'+lacc);

Sunday, June 23, 2024

Salesforce Development

 

Product Names



Install the Command Line Interface (CLI)

Salesforce CLI is the command-line tool for working with the Salesforce Platform. With Salesforce CLI, you can easily create environments for development and testing. Salesforce CLI also has commands to synchronize source code between your orgs and version control systems and to execute unit tests. 

See the Salesforce CLI Setup Guide for complete installation instructions for CLI.

  1. Install the Salesforce CLI.
  2. Confirm the CLI is properly installed and on the latest version by running the following command from the command line.
    sf update

Install Visual Studio Code and the Salesforce Extension Pack

Visual Studio Code is the Salesforce supported code editor for developers. The Salesforce extension pack contains features that leverage the Salesforce CLI to streamline development.

  1. Download and install the latest version of Visual Studio Code for your operating system. If you already have Visual Studio Code installed, there's no need to reinstall it.
  2. Launch Visual Studio Code.
  3. On the left toolbar, click Extensions.
  4. Search for Salesforce Extension Pack (Expanded) in the search field, click Salesforce Extension Pack (Expanded) and click Install.

Monday, June 17, 2024

Lightning Web Component

 Lightning Web Component


Data Binding:

    Ref Link: 

https://developer.salesforce.com/docs/platform/lwc/guide/js-props-getter.html

HTML:

<template>
<lightning-card title="Data binding">

<p class="slds-p-horizontal_small">
welcome to {message}
</p>
<lightning-input label="Name" value={message} onchange={handleChange}></lightning-input>
</lightning-card>
</template>

JS:

import { LightningElement } from 'lwc';

export default class DataBinding extends LightningElement {
message="Lightning Web Component";

handleChange(event){
this.message=event.target.value;
}

}
XML:

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>61.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__HomePage</target>
<target>lightning__RecordPage</target>

</targets>
</LightningComponentBundle>

Output

getterexample component:

HTML:
<template>
<lightning-card title="Getter Example">
<div class="slds-m-around_medium">
<lightning-input name="firstName" label="First Name" onchange={handleChange}
></lightning-input>
<lightning-input name="lastName" label="Last Name" onchange={handleChange}></lightning-input>
<p class="slds-m-top_medium">Uppercased Full Name: {uppercasedFullName}</p>
</div>
</lightning-card>
</template>


JS:
import { LightningElement } from 'lwc';

export default class GetterExample extends LightningElement {
firstName = " ";
lastName = " ";

handleChange(event) {
const field = event.target.name;
if (field === "firstName") {
this.firstName = event.target.value;
} else if (field === "lastName") {
this.lastName = event.target.value;
}
}

get uppercasedFullName() {
console.log("**FirstName "+this.firstName);
console.log("**LastNAme "+this.lastName);
return `${this.firstName} ${this.lastName}`.toUpperCase();
}
}

XML
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>61.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__HomePage</target>
<target>lightning__RecordPage</target>

</targets>
</LightningComponentBundle>

Output:


Communication using events

Events in LWC


  • Browser Events

  • Simple Event

  • Bubble Event

  • Composed Event

  • Pub Sub



https://github.com/trailheadapps


Dreamhouse App


https://trailhead.salesforce.com/content/learn/projects/quick-start-dreamhouse-sample-app

https://github.com/trailheadapps/dreamhouse-lwc

https://trailhead.salesforce.com/content/learn/projects/get-started-with-salesforce-development?trailmix_creator_id=sampatharjunan&trailmix_slug=dev-day-1-salesforce-overview

Friday, May 31, 2019

Approval Process in salesforce

Definition Approval Process

Salesforce approval process is an automated process and your organization can use to approve records in Salesforce, An approval process is combination of steps for a record to be approved and person has to approve it each step.A step can apply to all the records to that object or just record that meets the certain criteria. An approval process also specifies the actions to take when a record is approved, rejected, recalled, or first submitted for approval.


Saturday, May 25, 2019

Customizing the Page Layout lightning

 
Customizing the Page Layout

1. Add/Remove Fields
2. Add/Remove Buttons
3. Add/Remove Section
4. Add/Remove Blank Space
5. Add/Remove Related List
6. Customizing the Related List fields
7. Field Level Security
8. Add/Remove VF Pages
9. Add/Remove Links
10. Add/Remove Action

1.

Different between the standard field and custom field



Standard system generated field while creating object

     1. Created By
     2. Last Modified By
     3.Owner
     4.Name


Different Between custom field and Standard Field


S.No
Custom Fields
Standard Fields
1
Possibility to Change Label
yes
2
Possibility to change the API Name
No
3
Possibility to change the Data Type
No
4
Add Help Text
Yes
5
Add or Remove the picklist Value
Yes




Workflow

Workflow in salesforce lightning
Workflow Definition      
   
Workflows in Salesforce are a fantastic way to automate certain business processes. 

Setup -> Home ->Quick Find -> Workflow Rules.

1. Create a Workflow Rule
2.Select the object to which the workflow rule applies.
      Eg:Student__c

Rule Criteria
      Country is a picklist field and india is a value
      Country="India"

3. Salesforce will evaluate the rule when a record is: 

     1. Created
     2. Created, and every time it’s edited
     3. Created, and every time it’s edited to subsequently meet criteria. 

Workflow Action

Tasks
      Assign a new task to a Internal user, role, or record owner.
Email Alerts
     Send an email to specified email address on email field  or internal Users.
Field Update
   Updating the Fields (Either itself or parent object field only if it’s a mater details relationship) 
Outbound Messages
       Send an information to outside system (Via Web services)
 URL:
    https://requestbin.fullcontact.com/

     -> Need to enable remote site settings.











Sunday, May 19, 2019

Data Loader in salesforce

Dataloader



1. Intallation Required (Native Salesforce -free)


Setup->Home->Quick find box search->Data Loader

2. Following operation we can perform using Data Loader

              Insert
                      insert some record excel into salesforce org
              Update
                      update the existing record(Required Record ID)
              Upsert
                   both insert and update (Insert no need id but update required ID)
              Export
                    Export record into salesforce
    ExportALL
         Export record into salesforce with recycle bin record as wel
    Delete
        delete into salesforce (Required ID)

3.It will show success and error file

4.We can insert upto 50 lacks record into salesforce using Data loader

5.The major advantage of this function is that it can insert up to 50,000 records at a time

6.We can loads data from comma-separted values(CSV)files
When exporting data it outputs CSV files

7.You can also apply filters criteria on the export operation to take any specific data from salesforce.

How to enable the security token

8.Go to Settings –> My Personal Information –> Reset My Security Token
Click Reset Security Token
The new security token is sent to the email address in your Salesforce personal settings.










Monday, August 8, 2016

How to create Record Type in Salesforce?

Record Type Definition 

             To Differentiate the page layout with different different field


Step 1: Login to Salesforce

Step 2:  Before create a record type we must create business process for Standard object
            so that we can able to create record Type

           case->support process
           Lead->lead process
           Opportunity->sales process etc.......

 Step 3: Custom object no Need to create any business process
             
Step 4: From Setup, click Object Manager and select Employee. and Select Record type

Step 5: Create two Record Type   
                 1. Employee
                 2. Non Employee

Step 4: Create Two Page layout
                1.Employee PG             
                2.Non Employee PG

Step 5: Assign the Each Record type into Each Page layout