Bulkification in Salesforce

Bulkification in Salesforce

In Salesforce, we always attempt to write a code which is Bulkified. This is termed as the ideal way to write code. Bulkified Code or Bulkification means combining the respective tasks within the APEX. It is the sole thanks to get around Governor...

In Salesforce, we always attempt to write a code which is Bulkified. This is termed as the ideal way to write code. Bulkified Code or Bulkification means combining the respective tasks within the APEX. It is the sole thanks to get around Governor Limits.

Check it out more info at salesforce online training
Eg:
Public class JeanClassDemonstration{

Public static void applyDiscount(list<Levis__c>JeanListNew){

for(Levis__c j: JeanListNew){
	if(j.Price__c >= 1000){
		j.Price__c = j.Price__c - 100;

}
}
}

}
Sample Program for Bulkification: Using StartTest() or StopTest().
@isTest // Called as Annotation
Public class JeanDiscountClassTest(

//we are calling MyTestFunction1(){} -------> 30 DML

//we are calling MyTestFunction2(){} -------> 40 DML

Static testmethod void MyTestFunction3(){

======some other code======
======some other code======
======some other code======

Test.StartTest();   ----------------------> we can have 150DML commands inside the Start & Stop of Test ();

//create a new record data

Levis__c j = new Levis__c();
j.Name = ‘Louis’;
j.Price__c = 200;

//insert jean
Insert j;

//trigger will come to picture

//retrive the new jean
Levis__c j2 = new Levis__c ();

//same like, list<> MyList = New List();
j2=[SELECT Price__c FROM Levis__c WHERE id=j.id];

//test that the trigger correctly updated the price
system.assertEquals(900, j2.Price__c);

Test.StopTest(); ------------------------------------------------------>

}

======some other code======
======some other code======
======some other code======

//we are calling MyTestFunction4(){} ---------> 60 DML

//we are calling MyTestFunction5(){} ---------> 10 DML

)
In the above Bulkification sample program, we’ve maximum DML queries allowed. In order to use a few more DML queries, the function “Test.start test(); & Test.StopTest();” is required. The DML queries in-between these functions are counted from zero to 150 and permit to have the developer, more access to include DML queries in the function, which is useful in real-time processes.
RealTimeProcess use case of code for Bulkification:
Note: As mentioned earlier, one should avoid business logic in Trigger, and still we do that in below code just to avoid length and focus more on Bulkification concept.

check out Salesforce Interview questions
Sample Program#1
Trigger Code: Code which can work on one record or ’n’ number of records for Bulkification.
Wrong Code:
Trigger ChangeIndustry on Account (Before Insert){
Account.a = trigger.New[0];
a.Industry = ‘IT’;
}
Correct Code:
Trigger ChangeIndustry on Account (Before Insert){

for(Account.a = trigger.New){
	a.Industry = ‘IT’;

}

}
Sample Program#2
Wrong Code:
Trigger DemoTrigger on Levis__c (Before Insert){

list<JeanProductDetails> QueryResult = New list<JeanProductDetails>();
	for(Levis__c j : trigger.New){
		QueryResult = [SELECT productname__c FROM JeanProductDetails__c WHERE Price__c IN : AllPriceList ];
		//and some business logic on records.

}
}
Note:
Comparing with field name or variable → =: (Age = : Age_Of_Ajay__c)
Comparing with hard coded data → = (Eg: Age = 20)
Correct Code:
Trigger DemoTrigger on Levis__c (Before Insert){

//code for getting all price values
list AllPriceList = New List();

//Hint: whatever value we are comparing in the query, just collect those values in a list, using for each loop, and do nothing else in loop

	for(Levis__c j : trigger.New){
		AllPriceList.add(j.Price__c);
		//remove query from loop

}
list<JeanProductDetails__c> QueryResult = [SELECT id, productname__c FROM JeanProductDetails__c WHERE Price__c IN : AllPriceList ];
//IN - (1000,1200,300 )

For (JeanProductDetails__c j : Query Result){
	// and some business logic on product records using loop

}
Note:
=: → for comparing with one value
IN: → for comparing with multiple values/means, List.

Check it out SalesForce tutorial
Sample Program#3
Wrong Code:
Public Class CompanyDetails{
Public static void SearchIndustry (like<> CompanyList){
for(Company__c.p : CompanyList ){
Account a = [SELECT industry FROM Account WHERE name= : p.name__c];
//some business logic
}
}
}
Correct Code:
Public Class CompanyDetails{
Public static void SearchIndustry (like<> CompanyList){
list CompanyNameList = New List();

	for(Company__c p : CompanyList){
		CompanyNameList.add(p.Name__c);
		//IBM, Oracle, Google

}

list<> AccList = [SELECT industry FROM Account WHERE name IN : CompanyNameList];

for(Account a : AccList){
//some business logic on AccList using for each
}
}
}
Sample Program#4
Wrong Code:
Trigger DemoTrigger on DemoObject (Before Insert){

list<DemoObject>QueryResult=[SELECT productname FROM DemoObject];

for(DemoObject d : QueryResult){
DemoObject2 obj = new DemoObject2();
obj.Price = d.Price;
Insert obj;
}
}
}
Correct Code:
Trigger DemoTrigger on DemoObject (Before Insert){
list<> QueryResult = [SELECT productName FROM DemoObject ];

list<> ListForBulkDML = New list<Levis__c>();

for(DemoObject d : QueryResult ){
	
	Levis__c obj = new Levis__c();
	obj.Price = d.Price;
	ListForBulkDML.add(obj);

}

if(ListForBulkDML.IsEmpty() == false){ → //Best Practice
Insert ListForBulkDML;
}
}
In the next topic, we will discuss in detail about “Standard Controller In SOSQL Salesforce”. Keep following us for more info on Salesforce Development / Programming.

Salesforce Lightning Tutorial

Salesforce Lightning Tutorial

🔥Intellipaat Salesforce Lightning training course: https://intellipaat.com/salesforce-lightning-training/ This salesforce developer training for beginners vi...

This salesforce developer training for beginners video is a salesforce lightning tutorial where you will learn introduction to salesforce, salesforce components, salesforce lightning, lightning vs classic, lightning advantages & usage, how to create your first lightning component, career growth in salesforce lightning and salesforce lightning project in detail.

Salesforce Administrator Roles and Responsibilities

Salesforce Administrator Roles and Responsibilities

The Salesforce Administrator job is becoming one of the best career options across the IT industry. Its popularity is due to the rising demand for Salesforce services in the industry. So, in this blog, we would look into the details of the...

The Salesforce Administrator job is becoming one of the best career options across the IT industry. Its popularity is due to the rising demand for Salesforce services in the industry. So, in this blog, we would look into the details of the Salesforce and Salesforce Administrator’s responsibilities.

Why do we use Salesforce?
We have seen giant organizations, such as TCS, Infosys, Wipro, IBM, etc., having huge client bases, and these organizations always have several big projects on their desks. They use their own servers for hosting their Customer Relationship Management (CRM) systems. If you don’t know what CRM is, then let me tell you about that first.
CRM is an approach that helps companies organizes the association and interactivity with their budding customers. CRM systems take care of the retailing, sales, and customer support and services of an organization. Basically, it helps optimize and improve the growth of the business.
Before, all major companies used to build their own CRM solutions. It took a lot of time, effort, and money (in millions) to build these systems. Also, it was very difficult for small and emerging companies to build a CRM system at an affordable cost. Here came Salesforce with feasible solutions for building CRM systems.
Benefits of Using Salesforce
• It provides CRM software online at an affordable price, which can be customized according to the needs of a company.
• With Salesforce, companies need not worry about the infrastructure like installing hardware and software.
• It saves a lot of time, effort, and money for the organizations.
Therefore, we can say that Salesforce plays a crucial role in running a business efficiently.
Now, in this blog on Salesforce Administrator’s responsibilities, we will learn what Salesforce is all about.

Learn more about Salesforce from this Salesforce Certification and Training in New York to get ahead in your career! What is Salesforce?
Salesforce is one of the popular CRM tools available in the market today. It is an industry cloud ecosystem that provides services for setting up a business model successfully. From top MNCs to small start-ups, all make use of Salesforce services to deal with their business problems. While using Salesforce, we need not bother about the software and hardware setup, maintenance, and updates for the application. It is all maintained by Salesforce Developers. So, the presence of Salesforce helps us in focusing only on developing business ideas and innovations rather than maintaining technology. Also, it is a multiuser distributed system where multiple clients can use the technology at the same time.
Features of Salesforce

Here are some of the features of Salesforce:

• Fast: Salesforce is a platform that lays out the quickest path for developing an application after coming up with an idea. We can deploy the business model within weeks while a traditional system takes a year or more to do so.
• Easy to integrate: We can integrate Salesforce easily with other applications or software, such as Gmail, Outlook, SAP, etc.
• Easy to access: We can use Salesforce from any location via the Internet.
• Productive: As Salesforce is very simple to use, it can fit into the business structure with less effort. So, we can accomplish

the tasks productively with less time.
As we have skimmed through ‘What is Salesforce?,’ now, we would be looking into the Salesforce Administrator’s responsibilities.

Salesforce Administrator’s Responsibilities
Salesforce is an essential resource in the IT sector. Enterprises employing Salesforce into their business don’t need any infrastructure (hardware and software) as Salesforce runs it in the cloud ecosystem. Since data is a vital resource for any organization, it is much more valuable than what an organization spends on availing Salesforce services.
Organizations need an administrator who can take care of the crucial data submitted to the Salesforce cloud ecosystem. So, companies hire Salesforce Administrators for managing the Salesforce cloud ecosystem for them.
A Salesforce Administrator’s responsibilities consist of a wide variety of duties.

Here, we have compiled some of the major Salesforce Administrator’s responsibilities. A Salesforce Administrator is the one who:

• Takes care of using the available tools of Salesforce effectively
• Checks for the changes that need to be done for making the business processes effective
• Works as the main System Administrator for handling the work environment of Salesforce.com with multiple users
• Checks for restrictions on user accounts for vital data accessibility
• Takes care of the removal of redundancy and duplicity of user accounts
• Manages all executive functions, such as maintenance of user accounts, records, dashboards, and additional conventional tasks
• Organizes the assessment, extension, and conclusion of new requests for development
• Provides training to fresh users in the organization to make them skilled for participating in Salesforce-related processes
• Serves as the link connecting the application developers, business people, and users
• Remains responsible for creating and maintaining reports in Salesforce.com and extracting insights from data for advancing business revenue
• Handles all technological resources associated with sales and the feeding of data into Salesforce

Now, to fulfill the Salesforce Administrator’s responsibilities, certain skills are required. Going ahead, we will skim through the skill set required to carry out the Salesforce training responsibilities productively.
Salesforce Administrator Skills

A Salesforce Administrator should:

• Have magnificent management skills
• Possess proficiency in interacting with people at all levels of the company
• Be capable of effectively analyzing data accumulated from multiple sources
• Be an expert in Salesforce, for handling various business-related issues
• Have an understating of Conversion Rate Optimization (CRO) to optimize the growth rate of the sales team with the help of excellent data analysis skills
• Possess great data administration skills to retain data arranged and easily accessible
• Have excellent problem-solving skills to solve all the business and process-related problems of the organization
• Be responsible to maintain the consistency of the workflow and confidentiality of the business for the organization

Scope of a Salesforce Administrator

Salesforce Administrator is the captain for maintaining the business structure in Salesforce. Also, every company entering into the market, today, establishes its business model in Salesforce. So, we can imagine the importance of a Salesforce Administrator’s responsibilities for executing a successful business and the high-rising scope of a Salesforce Administrator.
Learn Salesforce Admin concepts from Onlineitguru’s Salesforce Online Training India and excel in your career!

Job Opportunities for Salesforce Administrators
According to Forbes, the number of openings for a Salesforce Administrator profile has increased in the last 2 years due to the newly emerging companies embracing Salesforce services. In 2019, we have more than 15,000 job openings for Salesforce professionals. The number manifests the overview of opportunities as a Salesforce Administrator in the present world. From this, we can infer the importance of the Salesforce Administrator role and its responsibilities.
Check out this insightful Salesforce Tutorial to learn more about Salesforce!
Salary Structure of Salesforce Administrators

According to Indeed, the average salary of a Salesforce Administrator is US$123,000 per year and, in India, it is₹7.8 LPA for a fresher. Companies invest a lot to get the Salesforce Administrator’s responsibilities fulfilled. Also, this six-figure salary is simply great to start the career as a Salesforce Administrator.

Finally, from all the aforementioned facts, we can infer that the graph of the career in Salesforce is always in a bottom-up fashion due to its importance in the industry.

This was all about the Salesforce Administrator’s responsibilities.
Come to Onlineitguru’s Salesforce online training in Hyderabad Community if you have more queries on Salesforce!

Top 50 Salesforce CPQ Interview Questions with Answers for 2020

Top 50 Salesforce CPQ Interview Questions with Answers for 2020

**1) What does CPQ stand for? Explain what it is all about?** Well, CPQ stands for Configure Price Quote. It is a software tool which is widely used by the sales personnel. So basically with this tool, the sales executives within an organization...

1) What does CPQ stand for? Explain what it is all about?

Well, CPQ stands for Configure Price Quote. It is a software tool which is widely used by the sales personnel. So basically with this tool, the sales executives within an organization will have an overall view of different aspects of a project quote and help them to reach to an optimum level when it comes to the price quote. All of this happens without any dependency on the other individuals.

2) What is QTC?

QTC stands for Quote to Cash and it is an end to end business process which start from generation of quote to receiving payments for customers.

Go through this Salesforce CPQ online training to get a clear understanding of Apttus CPQ!
3) What is APTTUS CPQ?

APTTUS CPQ is more one of leading CPQ services provides to clients which are provided by company named as APTTUS.

4) What is Product?

It is Product or services that can be sell to customer in as Standalone, Options and Bundle

• Standalone: It can be sold individually

• Bundle: two or more products can be sold as bundle

• Options: it provides additional choices for products to end users

5) What is more unique about this tool?

With the help of this tool, it gives the flexibility for the sales executives to work on the price quotes based on the latest approved pricing structures and discounting rules and approvals already predefined. So basically all these factors are taken into consideration while generating a particular price quote. All this can happen anywhere and right at their fingertips as on when there is a need. Thus making it a flexible tool and independent tool for all the sales executives within the organizations.

It not only makes your sales executives or officials life easier and efficient it also adds to the overall execution of the organization selling strategy.

6) What is QTC?

QTC stands for Quote to Cash and it is an end to end business process which start from generation of quote to receiving payments for customers.

7) What is Product Hierarchy?

Product Hierarchy is related to hierarchy of products which products are interlinked to another product

8) What is Product Attribute?

Product Attributes are related to features of a product like colour, weight, size and so on..

9) where it calls for a need of CPQ software?

The primary factors that are encountered within an organization where they see a growing need for CPQ software:

Extensive delays in quote creation process
Too many errors during the quote creation process or lot of loose ends It was out of date product related information and the pricing structures Doesn’t take opportunity about up selling or cross-selling platforms Lack of sales process optimization or visibility to grow the sales channel If you observe any of these challenges are actually bringing your sales team to under perform it is your responsibility to invest in a good CPQ software which helps you to be in a good position.

10) So what does ABO stands for in Apttus CPQ tool?

ABO stands for Asset-based ordering platform. S

11) Do we have any esignature process in Apttus CPQ tool?

Yes, Apttus DocuSign package can be integrated and thus enables the users to avail the esignature facility within Apttus interface.

12) What is an Audit Trail?

The Audit Trail function in Salesforce is useful for gaining information or for tracking all the recent setup changes that the administration has done in the organization. The audit trail can preserve data for up to six months.

13) How does CPQ software usage will transform the organization sales?

The following ways are the key aspects of transforming the organization’s sales, as follows:

Increase Speed
Eliminate Errors
Maximize Deal size
Provide accurate and updated information
14) What is search filters?

A. search filters help us to find results by using their field values. To find products, options we can use search filter based on their field values.

Become a master of Apttus by going through this online Salesforce CPQ training in Toronto!
15) What is Pricelist?

A. Pricelist store multiple prices of a particular products based on business flow.

16) Explain the Salesforce dashboard?

In Salesforce, the dashboard is a pictorial representation of the report. 20 reports can be added to a single dashboard.

17) Why does the CPQ tool help your sales executives with an Influencing behavior?

Well, it is a known factor that the more they sell the organization does make more profit from the sales so it is evident for the organization to actually invest in some sort of a tool which actually makes or inculcates a motivation. So one of such tool is nothing but CPQ, it does provide the right information about the product at the right time. Thus giving out a positive feeling for the sales executive and ultimately motivates him to do this over time.

18) How does CPQ is actually closing your CRM system gaps?

Well, when it comes to CRM systems most of them do not cater the option or flexibility of automating their price quote processes and thus making life hard. With the existing CRM applications that are out in the market, it is difficult to automate the price quote process. Thus forcing the employees to rely on standard Microsoft Word or Excel. By following this process, the entire flow of quote generation is slowed down to a maximum extent. Further, they might not be 100% accurate and prone to unidentified risks.

Thus being said about the slow price quote process, it will further affect the next steps like having low win rates and also more obstacles to make from potential lead to a customer. Thus, ultimately affecting the revenue for the organization.

What are the primary factors that are usually encountered within an organization

Why does CPQ tool is considered as a modern-day utility tool for an organization?

It is considered to be a modern-day utility tool because it caters:

Offers a superior selling platform Single source of truthful and worthy information about products Targeted price quotes because of the customization Incentives provided based on the product selections

Recommend reads here: Salesforce CPQ online training Hyderabad