Whats is alternative of sugar_rename in Sugar on Demand ?

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.

Parents Reply Children
  • We have created one installable zip package for sugarcrm. In pre_execute function we have below code.

    if(file_exists('custom/modules/EmailTemplates/DetailView.php')) {
    $new_file = 'custom/modules/EmailTemplates/DetailView'.$now.'.php';

    This will take backup of existing file(custom/modules/EmailTemplates/DetailView.php). But on cloud platform, sugar_rename did not work. So we need any alternative for sugar_rename function for sugar cloud.