Thursday, 18 May 2023

Tools for Lightning Web Component Development

 Below are the tools required for Web Component Development


1. Chrome Browser (Prefered)

You can download it from Google


2. Visual Studio Code Editor

You can get VS from the below link download based on OS which you have

https://code.visualstudio.com/Download


3. Liver Server Extension in the visual studio code 

The above will run the code automatically without refresh


😃😃 Happy Learning 😃😃

Thursday, 4 May 2023

Fundamentals of HTML and CSS


 Fundamentals of HTML and CSS


HTML - Hypertext Markup Language

  •  Hypertext refers to how web pages(HTML documents) are linked together.
  • The markup language is a computer language that uses tags to define elements within a document.
  • HTML DEscribes the structure of a WebPage.
  • HTML elements tell the browser how to display the content.


Most commonly used HTML Elements 

<tagname> - Start tag

content  

</tagname> - End tag

Example : 

<H1> Hello World </H1>


<div> - This tag defines a division in an HTML document.

<p>    - This tag is used for the paragraph that starts on a new line and adds some margin before and adds some margin before and after a paragraph

<h1> to <h6> - These tags are used to give headings of different size

<a>   - These tags help you to insert an image into the web page

<ul>  - This will list items using plain bullets

<img> -These tags help you to insert an image into the web page

HTML Attributes

  • HTML attributes provide additional information about HTML elements.
  • Attributes are always specified in the start tags.
  • Attributes usually come in name/value.

Example:

<a href="https://www.salesforce.com">Salesforce</a>


HTML data Attribute

    The data attribute is used to store custom data private to the page or application

Example:

<div data-name="Test">Username</div>


HTML Block Level

    Element always starts on a new line and occupies the full width.

Example : <div>,<p>,<h1> to <h6><ul>,<header>,<article>


HTML Inline Level

    The element does not start on a new line and it only takes up as much width as necessary 

Example : <span>,<img>,<a>,<label>,<strong>



CSS - Cascading Style Sheets

It is used to control the style of the web page


CSS Syntax

selector{property: value}

  • Selector - it is used to find the HTML element you want to style
  1. Element Selector - use of the HTML tags for styling

        p{color: blue;}

      2. ID Selector - uses the id attribute of an HTML element to select a specific element. To select an element with a specific id, write a hash(#) character, followed by the id of the element 

        #idofthetag{color:blue;}

      3. Class Selector - uses the class attribute of an HTML element to select a specific element. To select an element with a specific class, write a dot(.) character, followed by the class of the element.

        .classname{color:blue;}


  • Property - CSS Property you want to apply like size, color, border etc
  • Value - It is the value assigned to a property for color property value is red etc

Types of CSS Styles

There are three types of CSS styles 

1. Internal CSS - not used in LWC

2. Inline CSS

3. External CSS or third-party library like Bootstrap, salesforce lightning design system


😃😃 Happy Learning 😃😃

Wednesday, 26 April 2023

Modules and Topics for Salesforce LWC

 

If you want to learn Salesforce LWC below are the modules and topics that need to be covered 


 Fundamentals of HTML and CSS

Tools for Lightning Web Component Development

JavaScript is required to master the LWC

Setup of Vscode,  Scratch Org

What are Lightning Web Components?

Benefits of Lightning Web Components

Data Binding and Properties

Getter and setter

Components Communication

Lifecycle hooks

PubSub module

Lightning Messaging Service

Rendering components conditionally

Template looping

Lightning Data Services and Base components to get Salesforce data in Lightning Web Components

Navigation Service

Apex connection

Wire service

Tuesday, 25 April 2023

Modules and Topics For Salesforce Admin


If you want to learn Salesforce Admin below are the modules and topics that need to be covered   


Cloud Computing

What is Cloud Computing 

Diff between cloud and normal application

Advantages of Cloud 

Multitenant application

Types of Cloud Computing


CRM

What is CRM

Types of CRM

Product lifecycle


Introduction to Salesforce

What is Salesforce

Salesforce Vs Force.com

Salesforce Clouds 

Salesforce editions & licensing


Enterprise Application Layers

User Interface layer

Database layer

Business layer

Recruiting Application


Database Design Concepts

Object (Data definition)

Data(Field) types

Record & External ID’s

Schema Builder

Master detail & lookup relationships 

Formula and Rollup summary fields

Dependent picklists

Record types

Field History tracking 


User Interface

Salesforce Application

Tabs and types

Page layouts


Security & User Access Management

User Authentication

Profiles

Roles 

Sharing settings 

Permission Set 

Queues & Public Groups 


Business Layer

Validation Rules 

Workflow Rules 

Approval Process 

Lighting Process Builder


Lead Management

Web to Lead 

Lead Assignment rules 

Lead Conversion 

Sales Process


Case Management

Web to case 

Email to Case

Case Assignment rules 

Case escalation rules 

Support Process


Data Management

Data Import Wizard 

Data Loader


Analytics

Reports 

Dashboards 

Analytic Snapshots 

Custom Report Types 

Report Scheduling & Sharing Concepts


Development Life Cycle

Sandboxes 

Types of Sandboxes 

Deployments techniques


Cloud Computing 

Multitenant Architecture 

Governor Limits


Miscellaneous

Territory Management 

Custom settings, labels & Metadata 

Identity Management & SSO 

Person Accounts 

Chatter 

Communities 

Salesforce and Outlook 

Home Page Layout and Custom links



                                           ðŸ˜ƒðŸ˜ƒ Happy Learning 😃😃


Monday, 24 April 2023

Adding list of values/Records to Key using Apex Map

 

We can add records to the list directly using the "add" method but while coming to add list or values/records to a key we need to use map<id,list<subject>>.


Below is the sample code:


Map<Id, List<user>> mapUserRoleToUsers = new Map<Id, List<user>>();

for(User userRec : [SELECT UserRoleId FROM User LIMIT 50000]) {

//Checks if the User Role Id is already added to key or not 

if(mapUserRoleToUsers.containsKey(userRec.UserRoleId)) {

List<user> usersRecs = mapUserRoleToUsers.get(userRec.UserRoleId);

usersRecs.add(userRec);

mapUserRoleToUsers.put(userRec.UserRoleId, usersRecs);

} else {

mapUserRoleToUsers.put(userRec.UserRoleId, new List<user> { userRec });

}

}


From the above code you can get all the user records based on the user role id.

Thursday, 31 December 2020

How to display Salesforce Data Storage Limits for the current Org ?

How to display Salesforce Data Storage Limits for the current Org ?


For the population of data storage limits in the VF, we need just a small rest API code.

HttpRequest req = new HttpRequest();
req.setEndpoint('https://.salesforce.com/services/data/v37.0/limits/');
req.setMethod('GET');
req.setHeader('Authorization', 'OAuth ' + UserInfo.getSessionId());
// Create a new http object to send the request object
// A response object is generated as a result of the request
Http http = new Http();
HTTPResponse res = http.send(req);
String jsonStr = res.getBody();

Map m = (Map)JSON.deserializeUntyped(jsonStr);
System.debug('Data Storage:' + m.get('DataStorageMB'));
System.debug('HTTP response' + jsonStr);

But actually we are holding a current version 50.0 but in the code i have written with the older version.
In the above mentioned version we will get all the data storage limits and api call limits but we can't get the data info like how many records were created per object (count).

example : If you have to populate the data count of the standard objects and custom objects in the vf.
so this can't be happened through the normal soql query, means you have to write the query on multiple objects but instead of writing the multiple lines of code this can be achievable via a simple rest API callout.

In the new version 50 by changing the above code EndPoint URL to the /services/data/v50.0/limits/recordCount?sObjects=Account,Contact

we can fetch the data count..

Hope above info is helpful , Thank you :-)

Sunday, 22 November 2020

Tools for Lightning Web Component Development

 Below are the tools required for Web Component Development 1. Chrome Browser (Prefered) You can download it from Google 2. Visual Studio Co...