• cwarheit
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I have a client that needs to have phone lines with their properties (call waiting, call forwarding, etc) to be associated with an opportunity.  So, I've created a custom object called Phone Lines and created all of the fields.  When the users are creating the opportunity and adding phone lines, there is nearly always more than one and sometimes can be 20 or more (If the number is too high, we'll just import).  Often the phone lines have the same properties, so ideally, there should be a way for them to add a line and then instead of saving and going through the process of adding another line, I'd like a button that will allow them to save that number and bring back the form with the same properties selected, except the line number.  Since this has a lot of customization, I figured it would be best using VisualForce, but outside of the basic tutorials, I have no practical VF experience and would like a little guidence.  What I'd like to do is this: 
1. When they enter a phone number, and click the "save & clone" (or something like that), I would like to stick the data from the first number in an array
2. Take the properties of the last saved number  and repopulate the form minus the number. 
3. The user will continue to do this until they have entered all the numbers that they need to enter
4. The user would then click a "finish" button and that would take the data from array and save the data in the database.

Can anyone give me some recommendations?  Can I use VF for this?  I've been looking for arrays and all I can find are Lists - are lists arrays in APEX?

Any help or advice would be appreciated.
I am helping someone who is going to need to associate a list of phone lines with an opportunity.  The phone lines have a set of properties associated to them (call waiting, call forwarding, caller-id, etc) and each opportunity will can have up to 20 or more phone lines associated with them.  Often the phone lines have the same properties, only different numbers.  So, I want to create a new object associated with an opportunity and when they are entering a new number, I'd like for them to have a button that says "Save & Clone" similar to "Save & New", except when they click the button, it saves their input and then returns the form pre-filled with the previous save.  I'm assuming I'll need to create an s-control, but outside of that, I have no idea where to start.  Can someone point me to a similar example or give me some ideas of how to accomplish this?

Thanks in advance.

Craig