Salesforce Development Learning

Web Application:



Frond End: which user view/see websites/Applications.
Back End: By using backend applications and database servers users can perform operations.

Ex: Amazon, Flipkart, Yesbank, Titan etcs.

Web Technologies:


Salesforce user interfaces:
1. Classic-before 2014
2. Lightning-2014

Front Salesforce technologies:
1. Classic: Visualforce Pages.
2. Lightning: Aura Components and Lightning web components.

-------------------------------------------********************------------------------------------------------

Apex Fundamentals:

System.debug('Hey I wrote code finally buddy');
or
String greeting = 'My code';
system.debug('greeting');

things to know here:

system.debug(); system-defined method used to printable statements
string = datatype represents character values
greeting= variable
//////////////////////////////////////////////////////////////////////////////////////////////////////

Datatypes in Apex:
1. Primitive
2. Collections
3. Sobjects
4. Enum


Primitive datatypes Examples:

String:
String name = ' Monster';
system.debug('name');

Integer:
Integer barrelNumbers = 1000;
system.debug(' value of barrelNumbers variable: '+barrelNumbers);

Boolean:
Boolean shipmentDispatched;
shipmentDispatched = true;
System.debug('Value of shipmentDispatched '+shipmentDispatched);

Date:
Date ShipmentDate = date.today();
System.debug('ShipmentDate '+ShipmentDate);

Long:
Long companyRevenue = 21474838973344648L;
system.debug('companyRevenue'+companyRevenue);


Collection Datatypes in Apex:
1. List:
To have a list of values we will use a list. List contains duplicate values also.

integer num1=13;
system.debug(num1);

integer num2=14;
system.debug(num2);

integer num3=15;
system.debug(num3);
///////////////////////////////////////////
list<integer> num = new list<integer>{13,14,15};
system.debug(num);
num.add(16);
num.add(17);
num.add(18);
system.debug(num);

To remove number from index: num.remove(2);    /// Method is remove()
To get number from index:  num.get(2);                 /// Method is get()
To add number from index: num.add(2,20);           /// Method is add(index, number)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
integer num = 123;
system.debug('number is :' +num);

string name = 'Ravi';
system.debug('Name is :' +name);

decimal value = 123.45;
system.debug('Decimal value is: ' +value);

date mydate = date.today();
system.debug('Today date is: '+ mydate);
system.debubg(date.today());

Boolean bol = true;
system.debug('Boolean value' +bol);

list<integer> num = new list<integer>{14,15};
num.add(16);
system.debug(num);

list<string> names = new list<string>{'Ravi','Kiran'};
names.add('Ahmed');
system.debug(names);

set<integer> dup = new set<integer>{12,13,14,15,12};
system.debug(dup);
dup.add(17);
system.debug(dup);
dup.add(14);
system.debug(dup);

set<string> dup1 = new set<string>{'Ravi','Ahmed','San'};
system.debug(dup1);
dup1.add('Ravi');
system.debug(dup1);

map<integer,string> mapvalue = new map<integer,string>();
mapvalue.put(12,'Ravi');
mapvalue.put(13,'Ahmed');
mapvalue.put(14,'Chandra');
mapvalue.put(16,'Test');
system.debug(mapvalue);
/// to get all key ///
set<integer> newset = mapvalue.keyset();
system.debug(newset);
/// to get all values///
list<string> newnames = mapvalue.values();
system.debug(newnames);


\\\\\\\\\\\\\  List, Set, Map\\\\\\\\\\\\\
///////////// LIst /////////
List<integer> num = new list<integer>();
num.add(12);
num.add(13);
system.debug(num);

///////// Set /////////
set<string> names = new set<string>();
names.add('Ravi');
names.add('ahmed');
system.debug(names);

///////////// Map //////
map<integer, string> empnamenum = new map<integer,string>();
empnamenum.put(12,'Ravi');
empnamenum.put(13,'Kiran');
empnamenum.put(14,'Ahmed');
system.debug(empnamenum);

set<integer> number1 = empnamenum.keyset();
system.debug(number1);
system.debug(empnamenum.keyset());

list<string> namess = empnamenum.values();
system.debug(namess);
system.debug(empnamenum.values());



















 

Comments

Popular posts from this blog

Salesforce Admin Notes

Top Asked Salesforce Admin Questions and Answers