-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
18Questions
-
18Replies
Issue with trigger.
I am writing a trigger which will check and prevent creation of duplicate contatcs.
It's working fine for email but it's not checking Name .
trigger toCheckDuplicateRecord on Contact(before update,before insert) {
List<Contact> Contactlst= new List<Contact>();
Contactlst= [select Name,Email from Contact];
for(Contact conobj:Contactlst)
{
for(Contact con:trigger.new){
if(conobj.Email==con.Email || conobj.Name==con.Name)
con.adderror('You can not enter this contact');
}
}
}
Please suggest.
It's working fine for email but it's not checking Name .
trigger toCheckDuplicateRecord on Contact(before update,before insert) {
List<Contact> Contactlst= new List<Contact>();
Contactlst= [select Name,Email from Contact];
for(Contact conobj:Contactlst)
{
for(Contact con:trigger.new){
if(conobj.Email==con.Email || conobj.Name==con.Name)
con.adderror('You can not enter this contact');
}
}
}
Please suggest.
-
- SKT CloudComputing
- February 14, 2016
- Like
- 0
- Continue reading or reply
Controller and Apex class?
1- Diff. between controller and Apex class?
2- any specific reason to use custome controller?
Can anyone help to understand these two concepts?
Thanks!
2- any specific reason to use custome controller?
Can anyone help to understand these two concepts?
Thanks!
-
- SKT CloudComputing
- February 13, 2016
- Like
- 0
- Continue reading or reply
Issue with wrapper class.
VF Page-
<!----------- Creating this page for dispaly Opportunity fields object in single table with check box ---------->
<apex:page controller="WrapperIntStringDisplayClass">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockTable value="{!lstwrapperIntString}" var="w">
<apex:column headervalue="click2Select">
<apex:inputcheckbox />
</apex:column>
<apex:column headervalue="Opportunity fields">
{!w.Id}
{!w.Name}
{!w.Amount}
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Apex Class-
public with sharing class WrapperIntStringDisplayClass {
public List<wrapper> lstwrapperIntString {get;set;}
public WrapperIntStringDisplayClass(){
lstwrapperIntString = new List<wrapper>();
for(opportunity opp : [select Id, Name,Amount from opportunity]){
lstwrapperIntString.add(new wrapper(opp.Id,opp.Name,opp.Amount));
}
}
//Wrapper Class Construction
public class wrapper{
public String Id{get;set;}
public String Name{get;set;}
public Double Amount{get;set;}
// Wrapper class constructor
public wrapper(String Id,String Name,Double Amount ){
this.Id=Id;
this.Name=Name;
this.Amount=Amount;
}
}
}
I am getting Below error-
[Error] Error: WrapperIntStringDisplayClass Compile Error: Constructor not defined: [WrapperIntStringDisplayClass.wrapper].<Constructor>(Id, String, Decimal) at line 7 column 37
Can anyone help in this.
<!----------- Creating this page for dispaly Opportunity fields object in single table with check box ---------->
<apex:page controller="WrapperIntStringDisplayClass">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockTable value="{!lstwrapperIntString}" var="w">
<apex:column headervalue="click2Select">
<apex:inputcheckbox />
</apex:column>
<apex:column headervalue="Opportunity fields">
{!w.Id}
{!w.Name}
{!w.Amount}
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Apex Class-
public with sharing class WrapperIntStringDisplayClass {
public List<wrapper> lstwrapperIntString {get;set;}
public WrapperIntStringDisplayClass(){
lstwrapperIntString = new List<wrapper>();
for(opportunity opp : [select Id, Name,Amount from opportunity]){
lstwrapperIntString.add(new wrapper(opp.Id,opp.Name,opp.Amount));
}
}
//Wrapper Class Construction
public class wrapper{
public String Id{get;set;}
public String Name{get;set;}
public Double Amount{get;set;}
// Wrapper class constructor
public wrapper(String Id,String Name,Double Amount ){
this.Id=Id;
this.Name=Name;
this.Amount=Amount;
}
}
}
I am getting Below error-
[Error] Error: WrapperIntStringDisplayClass Compile Error: Constructor not defined: [WrapperIntStringDisplayClass.wrapper].<Constructor>(Id, String, Decimal) at line 7 column 37
Can anyone help in this.
-
- SKT CloudComputing
- February 10, 2016
- Like
- 0
- Continue reading or reply
Batch class in Apex??
I have below questions w.r.t. batch class.
1- What is batch apex class?
2- what are all the methods defined in batch apex class?
3- what are the return types and syntaxes of all methods of batch apex class?
4- when we need to go for batch apex class?
It would be a great help if anyone can shar one's own experience for these questions rather than sharing link of documents.
Thanks!
1- What is batch apex class?
2- what are all the methods defined in batch apex class?
3- what are the return types and syntaxes of all methods of batch apex class?
4- when we need to go for batch apex class?
It would be a great help if anyone can shar one's own experience for these questions rather than sharing link of documents.
Thanks!
-
- SKT CloudComputing
- February 09, 2016
- Like
- 0
- Continue reading or reply
difference between with sharing and without sharing??
Hello All,
I am new to salesforce and gone through documentation. I ended with some queries as below-
1- What is default keyword?
2- If we do not write any keyword then what will happen?
3- If it run in by default mode then what is need for using 'without sharing' keyword.
Please provide some real exmaples (calling and called class format), it would be great help.
Thanks!
I am new to salesforce and gone through documentation. I ended with some queries as below-
1- What is default keyword?
2- If we do not write any keyword then what will happen?
3- If it run in by default mode then what is need for using 'without sharing' keyword.
Please provide some real exmaples (calling and called class format), it would be great help.
Thanks!
-
- SKT CloudComputing
- February 09, 2016
- Like
- 0
- Continue reading or reply
In how many ways we can achieve one-to -one relationship in salesforce.
In how many ways we can achieve one-to -one relationship in salesforce.
Can anyone please explain with examples.
Can anyone please explain with examples.
-
- SKT CloudComputing
- January 27, 2016
- Like
- 0
- Continue reading or reply
difference between commandButton and pageBlockButton
I want to know difference between commandButton and pageBlockButton for interview purpose.
Please suggest some important difference not the salesforce's definition.
Thanks You!
SKT
Please suggest some important difference not the salesforce's definition.
Thanks You!
SKT
-
- SKT CloudComputing
- January 22, 2016
- Like
- 0
- Continue reading or reply
Standard setcontroller
What is Standard setcontroller?
What are the diffrences between standard controller and standard setcontroller?
I have gone through Salesfroce doc but did not get it.
Can anyone provide a general and understandable approcah.
Thanks
SKT
What are the diffrences between standard controller and standard setcontroller?
I have gone through Salesfroce doc but did not get it.
Can anyone provide a general and understandable approcah.
Thanks
SKT
-
- SKT CloudComputing
- January 20, 2016
- Like
- 0
- Continue reading or reply
Standard List Controller
I am new to salesforce. I tried to use the standard list controller. I used teh belwo code but did not get any record on page.
Code-
<apex:page standardController="Account" recordSetVar="accounts" sidebar="false">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!Accounts}" var="a">
<apex:column headerValue="Account Name"/>
<apex:outputField value="{!a.Name}"/>
</apex:pageBlockTable>
<apex:pageBlockButtons location="bottom" >
<apex:commandButton value="First" action="{!first}"/>
<apex:commandButton value="Last" action="{!last}"/>
<apex:commandButton value="Next" action="{!next}"/>
<apex:commandButton value="previous" action="{!previous}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Code-
<apex:page standardController="Account" recordSetVar="accounts" sidebar="false">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!Accounts}" var="a">
<apex:column headerValue="Account Name"/>
<apex:outputField value="{!a.Name}"/>
</apex:pageBlockTable>
<apex:pageBlockButtons location="bottom" >
<apex:commandButton value="First" action="{!first}"/>
<apex:commandButton value="Last" action="{!last}"/>
<apex:commandButton value="Next" action="{!next}"/>
<apex:commandButton value="previous" action="{!previous}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
-
- SKT CloudComputing
- January 18, 2016
- Like
- 0
- Continue reading or reply
API calls made during 1 million record insertion.
I have below two queries regarding this.
Query1- How many API calls will be made in we insert 1 M records using Normal API.
Query2- How many API calls will be made in we insert 1 M records using Bulk API.
Query 3- Is there any fix formula to calculate API calls?
Query1- How many API calls will be made in we insert 1 M records using Normal API.
Query2- How many API calls will be made in we insert 1 M records using Bulk API.
Query 3- Is there any fix formula to calculate API calls?
-
- SKT CloudComputing
- January 12, 2016
- Like
- 0
- Continue reading or reply
Inser NULL values through Data Loader.
I would like to know how can I insert NULL values for a record through Data Loader in below two scenarios-
Scenario1- In case of Normal API
Scenario2- In case Bulk API
Can you please illustarte it with example. It will be a great help to understand it.
Scenario1- In case of Normal API
Scenario2- In case Bulk API
Can you please illustarte it with example. It will be a great help to understand it.
-
- SKT CloudComputing
- January 12, 2016
- Like
- 0
- Continue reading or reply
Prerequisite for creating A Record Type..
What is the prerequisite for creating a RD in salesforce...
-
- SKT CloudComputing
- January 07, 2016
- Like
- 0
- Continue reading or reply
Difference Between Custom sales Process and Standard Sales Process...
What are differences b/w custome sales process and standard sales process.
-
- SKT CloudComputing
- January 07, 2016
- Like
- 0
- Continue reading or reply
-
- SKT CloudComputing
- January 05, 2016
- Like
- 0
- Continue reading or reply
Audit Fields in Salesforce
What are the Audit Fields in Salesforce?
Why do we need these fields?
How can we create these fields?
Thanks!
Why do we need these fields?
How can we create these fields?
Thanks!
-
- SKT CloudComputing
- January 04, 2016
- Like
- 0
- Continue reading or reply
Filed Tracking History
I have set Filed Tracking History for below three standard fields in Lead object.
Address
Company
Annual Revenue
After this I added "Lead History" related list to Lead(Sales) page layouts.
Whenever I am changing these 3 fields I am not able to check that "Lead History" list in Lead page.
Thanks!
Address
Company
Annual Revenue
After this I added "Lead History" related list to Lead(Sales) page layouts.
Whenever I am changing these 3 fields I am not able to check that "Lead History" list in Lead page.
Thanks!
-
- SKT CloudComputing
- December 31, 2016
- Like
- 0
- Continue reading or reply
Jobs in Salesforce
Can someone explain the what? why? and when? about below jobs-
Scheduled Jobs
Apex Jobs
Bulk Data Load Jobs
Scheduled Jobs
Apex Jobs
Bulk Data Load Jobs
-
- SKT CloudComputing
- December 29, 2016
- Like
- 0
- Continue reading or reply
Queues in Salesforce
I am new to SFDC. I have created a queue (Open Lead) in Admin User and assigned that queue to another user(XYZ).
I created a Lead Assignment rule with criteria as below-
(Lead: Lead SourceEQUALSWeb) AND (Lead: Lead StatusEQUALSOpen - Not Contacted).
Now I created few lead records which met the above criteria. Then I log in to account of user -XYZ and open the Queue here but I am not able to see those leads in queue (in XYZ account)
Can someone help me to understand the practical approcah of Queue witha bove scenario.
I created a Lead Assignment rule with criteria as below-
(Lead: Lead SourceEQUALSWeb) AND (Lead: Lead StatusEQUALSOpen - Not Contacted).
Now I created few lead records which met the above criteria. Then I log in to account of user -XYZ and open the Queue here but I am not able to see those leads in queue (in XYZ account)
Can someone help me to understand the practical approcah of Queue witha bove scenario.
-
- SKT CloudComputing
- December 29, 2016
- Like
- 0
- Continue reading or reply
Issue with trigger.
I am writing a trigger which will check and prevent creation of duplicate contatcs.
It's working fine for email but it's not checking Name .
trigger toCheckDuplicateRecord on Contact(before update,before insert) {
List<Contact> Contactlst= new List<Contact>();
Contactlst= [select Name,Email from Contact];
for(Contact conobj:Contactlst)
{
for(Contact con:trigger.new){
if(conobj.Email==con.Email || conobj.Name==con.Name)
con.adderror('You can not enter this contact');
}
}
}
Please suggest.
It's working fine for email but it's not checking Name .
trigger toCheckDuplicateRecord on Contact(before update,before insert) {
List<Contact> Contactlst= new List<Contact>();
Contactlst= [select Name,Email from Contact];
for(Contact conobj:Contactlst)
{
for(Contact con:trigger.new){
if(conobj.Email==con.Email || conobj.Name==con.Name)
con.adderror('You can not enter this contact');
}
}
}
Please suggest.
- SKT CloudComputing
- February 14, 2016
- Like
- 0
- Continue reading or reply
Controller and Apex class?
1- Diff. between controller and Apex class?
2- any specific reason to use custome controller?
Can anyone help to understand these two concepts?
Thanks!
2- any specific reason to use custome controller?
Can anyone help to understand these two concepts?
Thanks!
- SKT CloudComputing
- February 13, 2016
- Like
- 0
- Continue reading or reply
Issue with wrapper class.
VF Page-
<!----------- Creating this page for dispaly Opportunity fields object in single table with check box ---------->
<apex:page controller="WrapperIntStringDisplayClass">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockTable value="{!lstwrapperIntString}" var="w">
<apex:column headervalue="click2Select">
<apex:inputcheckbox />
</apex:column>
<apex:column headervalue="Opportunity fields">
{!w.Id}
{!w.Name}
{!w.Amount}
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Apex Class-
public with sharing class WrapperIntStringDisplayClass {
public List<wrapper> lstwrapperIntString {get;set;}
public WrapperIntStringDisplayClass(){
lstwrapperIntString = new List<wrapper>();
for(opportunity opp : [select Id, Name,Amount from opportunity]){
lstwrapperIntString.add(new wrapper(opp.Id,opp.Name,opp.Amount));
}
}
//Wrapper Class Construction
public class wrapper{
public String Id{get;set;}
public String Name{get;set;}
public Double Amount{get;set;}
// Wrapper class constructor
public wrapper(String Id,String Name,Double Amount ){
this.Id=Id;
this.Name=Name;
this.Amount=Amount;
}
}
}
I am getting Below error-
[Error] Error: WrapperIntStringDisplayClass Compile Error: Constructor not defined: [WrapperIntStringDisplayClass.wrapper].<Constructor>(Id, String, Decimal) at line 7 column 37
Can anyone help in this.
<!----------- Creating this page for dispaly Opportunity fields object in single table with check box ---------->
<apex:page controller="WrapperIntStringDisplayClass">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockTable value="{!lstwrapperIntString}" var="w">
<apex:column headervalue="click2Select">
<apex:inputcheckbox />
</apex:column>
<apex:column headervalue="Opportunity fields">
{!w.Id}
{!w.Name}
{!w.Amount}
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Apex Class-
public with sharing class WrapperIntStringDisplayClass {
public List<wrapper> lstwrapperIntString {get;set;}
public WrapperIntStringDisplayClass(){
lstwrapperIntString = new List<wrapper>();
for(opportunity opp : [select Id, Name,Amount from opportunity]){
lstwrapperIntString.add(new wrapper(opp.Id,opp.Name,opp.Amount));
}
}
//Wrapper Class Construction
public class wrapper{
public String Id{get;set;}
public String Name{get;set;}
public Double Amount{get;set;}
// Wrapper class constructor
public wrapper(String Id,String Name,Double Amount ){
this.Id=Id;
this.Name=Name;
this.Amount=Amount;
}
}
}
I am getting Below error-
[Error] Error: WrapperIntStringDisplayClass Compile Error: Constructor not defined: [WrapperIntStringDisplayClass.wrapper].<Constructor>(Id, String, Decimal) at line 7 column 37
Can anyone help in this.
- SKT CloudComputing
- February 10, 2016
- Like
- 0
- Continue reading or reply
Batch class in Apex??
I have below questions w.r.t. batch class.
1- What is batch apex class?
2- what are all the methods defined in batch apex class?
3- what are the return types and syntaxes of all methods of batch apex class?
4- when we need to go for batch apex class?
It would be a great help if anyone can shar one's own experience for these questions rather than sharing link of documents.
Thanks!
1- What is batch apex class?
2- what are all the methods defined in batch apex class?
3- what are the return types and syntaxes of all methods of batch apex class?
4- when we need to go for batch apex class?
It would be a great help if anyone can shar one's own experience for these questions rather than sharing link of documents.
Thanks!
- SKT CloudComputing
- February 09, 2016
- Like
- 0
- Continue reading or reply
difference between with sharing and without sharing??
Hello All,
I am new to salesforce and gone through documentation. I ended with some queries as below-
1- What is default keyword?
2- If we do not write any keyword then what will happen?
3- If it run in by default mode then what is need for using 'without sharing' keyword.
Please provide some real exmaples (calling and called class format), it would be great help.
Thanks!
I am new to salesforce and gone through documentation. I ended with some queries as below-
1- What is default keyword?
2- If we do not write any keyword then what will happen?
3- If it run in by default mode then what is need for using 'without sharing' keyword.
Please provide some real exmaples (calling and called class format), it would be great help.
Thanks!
- SKT CloudComputing
- February 09, 2016
- Like
- 0
- Continue reading or reply
In how many ways we can achieve one-to -one relationship in salesforce.
In how many ways we can achieve one-to -one relationship in salesforce.
Can anyone please explain with examples.
Can anyone please explain with examples.
- SKT CloudComputing
- January 27, 2016
- Like
- 0
- Continue reading or reply
difference between commandButton and pageBlockButton
I want to know difference between commandButton and pageBlockButton for interview purpose.
Please suggest some important difference not the salesforce's definition.
Thanks You!
SKT
Please suggest some important difference not the salesforce's definition.
Thanks You!
SKT
- SKT CloudComputing
- January 22, 2016
- Like
- 0
- Continue reading or reply
Standard List Controller
I am new to salesforce. I tried to use the standard list controller. I used teh belwo code but did not get any record on page.
Code-
<apex:page standardController="Account" recordSetVar="accounts" sidebar="false">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!Accounts}" var="a">
<apex:column headerValue="Account Name"/>
<apex:outputField value="{!a.Name}"/>
</apex:pageBlockTable>
<apex:pageBlockButtons location="bottom" >
<apex:commandButton value="First" action="{!first}"/>
<apex:commandButton value="Last" action="{!last}"/>
<apex:commandButton value="Next" action="{!next}"/>
<apex:commandButton value="previous" action="{!previous}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Code-
<apex:page standardController="Account" recordSetVar="accounts" sidebar="false">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!Accounts}" var="a">
<apex:column headerValue="Account Name"/>
<apex:outputField value="{!a.Name}"/>
</apex:pageBlockTable>
<apex:pageBlockButtons location="bottom" >
<apex:commandButton value="First" action="{!first}"/>
<apex:commandButton value="Last" action="{!last}"/>
<apex:commandButton value="Next" action="{!next}"/>
<apex:commandButton value="previous" action="{!previous}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
- SKT CloudComputing
- January 18, 2016
- Like
- 0
- Continue reading or reply
API calls made during 1 million record insertion.
I have below two queries regarding this.
Query1- How many API calls will be made in we insert 1 M records using Normal API.
Query2- How many API calls will be made in we insert 1 M records using Bulk API.
Query 3- Is there any fix formula to calculate API calls?
Query1- How many API calls will be made in we insert 1 M records using Normal API.
Query2- How many API calls will be made in we insert 1 M records using Bulk API.
Query 3- Is there any fix formula to calculate API calls?
- SKT CloudComputing
- January 12, 2016
- Like
- 0
- Continue reading or reply
Inser NULL values through Data Loader.
I would like to know how can I insert NULL values for a record through Data Loader in below two scenarios-
Scenario1- In case of Normal API
Scenario2- In case Bulk API
Can you please illustarte it with example. It will be a great help to understand it.
Scenario1- In case of Normal API
Scenario2- In case Bulk API
Can you please illustarte it with example. It will be a great help to understand it.
- SKT CloudComputing
- January 12, 2016
- Like
- 0
- Continue reading or reply
Filed Tracking History
I have set Filed Tracking History for below three standard fields in Lead object.
Address
Company
Annual Revenue
After this I added "Lead History" related list to Lead(Sales) page layouts.
Whenever I am changing these 3 fields I am not able to check that "Lead History" list in Lead page.
Thanks!
Address
Company
Annual Revenue
After this I added "Lead History" related list to Lead(Sales) page layouts.
Whenever I am changing these 3 fields I am not able to check that "Lead History" list in Lead page.
Thanks!
- SKT CloudComputing
- December 31, 2016
- Like
- 0
- Continue reading or reply
Queues in Salesforce
I am new to SFDC. I have created a queue (Open Lead) in Admin User and assigned that queue to another user(XYZ).
I created a Lead Assignment rule with criteria as below-
(Lead: Lead SourceEQUALSWeb) AND (Lead: Lead StatusEQUALSOpen - Not Contacted).
Now I created few lead records which met the above criteria. Then I log in to account of user -XYZ and open the Queue here but I am not able to see those leads in queue (in XYZ account)
Can someone help me to understand the practical approcah of Queue witha bove scenario.
I created a Lead Assignment rule with criteria as below-
(Lead: Lead SourceEQUALSWeb) AND (Lead: Lead StatusEQUALSOpen - Not Contacted).
Now I created few lead records which met the above criteria. Then I log in to account of user -XYZ and open the Queue here but I am not able to see those leads in queue (in XYZ account)
Can someone help me to understand the practical approcah of Queue witha bove scenario.
- SKT CloudComputing
- December 29, 2016
- Like
- 0
- Continue reading or reply
Create an Apex class that returns an array (or list) of strings.
Hello,
This is the trailhead questions which I am trying to solve :
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
Here is my code :
public class StringArrayTest {
public static List <String> generateStringArray (Integer n) {
List<String> List1 = new List<String> ();
for(Integer i=0;i<n;i++) {
List1.add('\'Test'+ i+'\'' );
}
System.debug(List1);
return List1;
}
}
I am getting following error :
Challenge not yet complete... here's what's wrong:
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.
I tried it many times but I am not able to solve this problem. Please help.
This is the trailhead questions which I am trying to solve :
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
Here is my code :
public class StringArrayTest {
public static List <String> generateStringArray (Integer n) {
List<String> List1 = new List<String> ();
for(Integer i=0;i<n;i++) {
List1.add('\'Test'+ i+'\'' );
}
System.debug(List1);
return List1;
}
}
I am getting following error :
Challenge not yet complete... here's what's wrong:
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.
I tried it many times but I am not able to solve this problem. Please help.
- Rohit Tripathi
- May 30, 2015
- Like
- 2
- Continue reading or reply