• kroberts31.3887885794840894E12
  • NEWBIE
  • -1 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi

I have a requirement where i need to clone oppportunity when a custom field is blank and stage is 'ready'.
Number of opportunities to be created by cloning from primary opportunity depends on a custom field called 'Number needed'

If number_needed__c = 10,then i want 9 opportunities to be created.

Name of each opportunity should be same but need to appened different number.For example:Primary opportunity =opportunity-need 1
then rest should be opportunity-need 2,opportunity-need 3,and so on..,

Any help on how i can get this?
I need some start up.Please help.

Thanks and kudos in advance.Please.

I currently an trying to replace all non-alphanumeric characters in a string and replacing everything but the space, would like that to be a hyphen, with a blank value to remove it and cannot figure out how to escape out commas, parenthesis, apostrophes, periods and colons.

The strings I am parsing could have any one of the characters below in them.

This is what I am using:
foo = foo.replaceAll('[\\,"\\:~|!|@|#|$|%|^|&|*|_|+|=|<|>|?\\(\\)\\{\\}\\;\\\']', '');
foo = foo.replaceAl(' ','-');
 
I have tried using but cannot get this to work either.
foo = foo.replaceAll('![a-zA-Z0-9]', '');
Any help would be appreciated.