• Pankaj Verma 07
  • NEWBIE
  • 19 Points
  • Member since 2013
  • SFDC Certified Admin Developer Consultant

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hi Guys,

 
Hope you are doing Well!!
Could you please let me know how to solve these basic problems which we face in all projects.
 
1.Implementing Country and State where State is dependent on Country .
 Option 1 is to go with SFDC State and Country picklist which they offer in Summer 13 
-->Not possible as such they have data only for US and UK so there is data restriction.
 option 2 to make custom objects of country and state and use them 
--> here all is good  except I have data problem since i have been able to find all country data but how to find state data.
option 3 
 if any 
 
Let me know which solution should i go for and how??
 
Thanks
Create an Apex class that returns an array (or list) of strings: 
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.

MyApexClass to above Challenge:

public class StringArrayTest {
    
    public static List<string> generateStringArray(Integer n)
    {
        List<String> myArray = new List<String>();
        
        for(Integer i=0;i<n;i++)
        {
            myArray.add('Test'+i);
            System.debug(myArray[i]);
        }
        return myArray;
        
    }


It's compile and execute as per requirement in Developer console. But Traihead showing the below 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.

Anyhelp would be greatly appreciated. Thanks.
 
Hi,

I wanted to get advice and guidance on the following action.

We usually use an apex trigger to create an opportunity automatically when a previous opportunity is set to "Closed - Won"

I would like to know if it might be possible to create this using visual workflow?

We sell warranty products and would like to have a new opportunity created for 1 year in the future, if the initial warranty is opportunity is closed won.

Thanks for reading this.

Mike




Hi,

I wanted to get advice and guidance on the following action.

We usually use an apex trigger to create an opportunity automatically when a previous opportunity is set to "Closed - Won"

I would like to know if it might be possible to create this using visual workflow?

We sell warranty products and would like to have a new opportunity created for 1 year in the future, if the initial warranty is opportunity is closed won.

Thanks for reading this.

Mike