How to make 'save and duplicate'

Hi,

I have been using the duplicate button and although it’s great it means I have to save the record and then click duplicate whereas there is also the ‘save and create new’ button that does save and then create new.

Is there anyway I could combine these two to make a ‘save and duplicate button’?

Thanks.

HI,

Do you want to do it for one module or every where in sugar where it is possible ?

For a particular module, you have to create custom controller with save and duplication action.

I would like it for all modules.

Can I not just change the function for ‘save and create new’ ? How would I do that?

Hi,

I would suggest,

Do not change behavior of Save and Create New. It is better to write new code for new button - Save and Duplicate.

You should identify modules which required such functionality.

If you want to go - as you have mentioned - then you have to be cautious how it will affect whole sugar - save and create new functionality.
You have to test it thoroughly.

Please have a look at this link -

http://techs.studyhorror.com/sugarcrm-how-add-custom-actions-i-46

You can add your own action - save and duplicate.

Sugar controller has save method which you have to study well and based on that you should go ahead.

Regards,

Alpesh Savaliya