AnsweredAssumed Answered

logic hook in Contracts wiping out records and not saving new records

Question asked by KarenV KarenV on Sep 14, 2015
Latest reply on Sep 15, 2015 by KarenV KarenV
I have a logic hook in Contracts which is bwc module. All I want it to do is grab the date from one field and put it in another. I've done this multiple times with modules that have been added to the 7.x framework but this is the first time I've had to deal with a bwc module. 

My code is as follows:
  $hook_version =1;
  $hook_array = Array();

  $hook_array['before_save'] = Array();
  $hook_array['before_save'][] = Array(

   //String to identify the hook

   //PHP file path

   //The Class method exists



  if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Point');

  class Contracts_Dates
   function install_plus_term($bean, $event, $arguments)
    if(isset($bean->install_date_c) == TRUE)
     $install_date = $bean->install_date_c
     $bean->test_c = $install_date;


Do bwc modules follow a different format for logic hooks or what am I missing?
We have an on-premise instance. Enterprise

Thank you in advance!