Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 1065

Create standard BO from Script [Clone existing opportunities]

$
0
0

Hello pros,

 

I have a specific business requirement that I'm not able to implement.

Purpose of the requirement :

ConsiderI have already in base hundreds of opportunities. I would like to create a button that fire a copy of all existing opportunities, or all existing filtered to the previous month.

 

 

Things I tried to do :

I created a "dumb/useless" Custom Object with a text field "dummy", created screens using "Screen scenario with thing based navigation" option then I created a BeforeSave script that will fetch for all Opportunities and will recreate them (basically : Opportunity.CreateWithRef(opportunity)).Problem here is not really the code part, but the fact that my script is never called. Tried also other proposed scripts :

 

Script files.PNG

They were not firing too.

To ensure that my code was not bugged, I tried a this.dummy = "blablabla" that should replace whats the user typed in the QC. Not working.

 

 

Giving up the previous solution, I had a look on the opportunity.owl, and as we cannot modify native screens, I tried to reproduce the following Copy Handler on my custom BO :

 

opportunity owl.PNG

 

The problem here is that you are not allowed to fire Outports in a different namespace of the custom object. You are not allowed to add field from BO located in a different namespace too.

Please, tell me if I'm wrong or if I'm doing something wrong.

 

 

Any suggestions, advices, or workarounds would be really appreciated.

Thanks a lot.

 

 

Regards,

Michael


Viewing all articles
Browse latest Browse all 1065

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>