How many accounts are in the org when this code runs? - ProProfs Discuss
Topics
Products
Follow Us:

How many accounts are in the org when this code runs?
A developer in a Salesforce org with 100 Accounts executes the following code using the Developer Console:Account myAccount = new Account (Name=’MyAccount’); insert myAccount; for(Integer x = 0;x < 150; x++){ Account myAccount = new Account(Name=’MyAccount’ + x); try{ insert myAccount; } catch (Exception ex){ System.Debug(ex); } } . 

How many accounts are in the org when this code runs? <br/>
A developer in a Salesforce org with 100 Accounts executes the following code using the Developer Console:Account myAccount = new Account (Name=’MyAccount’); 
insert myAccount; 
for(Integer x = 0;x < 150; x++){ 
 Account myAccount = new Account(Name=’MyAccount’ + x); 
 try{ 
 insert myAccount; 
 }
 catch (Exception ex){ 
 System.Debug(ex); 
 } 
 } 
. 

Change Image    Delete



A. 101
B. 100
C. 102
D. 252

This question is part of Platform 1d
Asked by Kevindotcar, Last updated: Aug 07, 2020

+ Answer
Request

2 Answers

H. Barnes

Subscribe to Pewdiepie

H. Barnes, Unemployed, Barnes, Atlanta

Answered Feb 26, 2019

The correct answer to this question is B. There are 100 executes with the use of the right code. There will be 100 acocunts made after the executes which are very important in Salesforce. These accounts usually mean that they will be potential business partners that you will have in your business.

These accounts could potentially be customers that you would need to satisfy with products and services that you offer. Accounts are usually connected to many other things that can be found in Salesforce. You can create different accounts with ease if you understand how important these accounts are.

 

John Smith

John Smith

Answered Oct 17, 2016

1. 100

Too Many SOQL Statements, and / or multiple definitions of my account.

 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.