Whats is alternative of sugar_rename in Sugar on Demand ?

Hello,
We are using sugar_rename function in sugar crm package to make a copy of custom file via pre_execute. But in sugar cloud this function is restricted. We need an alternative of sugar_rename for sugar cloud. We know about duplicate_file. duplicate_file is for uploaded file. But we need to make copy of custom file in our package. Please give us any solution.
Thanks!

Parents Reply Children
  • It should not be necessary to do this. 

    Upon a Module Loader Package being installed and if Sugar finds that the package is replacing an already existing file, the install process will automatically create a backup of said file for you for "restore" purposes. That allows you to revert to the previous state if you uninstall the package.

    As such, there is no need to be creating copies of files programmatically. 

    It is possible that the backup comment that was shared with you was in reference to making sure you have a backup of your instance in general, as it is certainly possible that you install a package that breaks your entire instance, but for reasons completely unrelated to the fact that you replaced an existing file.

  • Thank you for your valuable response. We don't know about this fact. Thanks again!