Results 1 to 2 of 2

Thread: Logic Hooks and Retrieve Data from other PHP files

  1. #1
    Secret_Agent_99's Avatar
    Secret_Agent_99 is offline Senior Member
    Join Date
    Jan 2010
    Location
    Island of Unknown Orgin
    Posts
    27

    Cool Logic Hooks and Retrieve Data from other PHP files

    Hi All,

    I am using Sugar 5.5 on windows.
    I created a logic hook to retrieve data fields and assign data.
    The file connected to the first logic hook PHP code:
    'custom/modules/HR_Employee/calculate.php'
    PHP Code:
    class CalculateDays  {   
          function 
    calc_orig(&$bean$event$arguments)      {
          echo 
    " HR Employee module ";
          if (
    $event == 'after_retrieve') {       
              
    $employee2 $bean->name;
            if(
    $employee2=="Joe Doe"){
                
    $var $bean->linkvacent_c;     
            }elseif(
    $employee2 =="Mark Smith"){
              
    $var $bean->linkvacent_c;
            }
            echo 
    " " $employee2 ": Vacation Entitled Days- " .$var " days;";
          }     }    } 
    The file I want to retrieve data is this: 'custom/modules/HR_Employee/sent.php';
    PHP Code:
     require_once 'custom/modules/HR_Employee/calculate.php';
        
    $EmployeeEntitled2 $var;
        echo 
    "from sent.php" $EmployeeEntitled2 " "
    The problem is that I cannot pull out the variable of $var from calculate.php into sent.php

    Any Ideas ?????

    Thanks in advance
    Agent 99
    Secret Service

  2. #2
    AlexAv's Avatar
    AlexAv is offline Sugar Community Member
    Join Date
    Oct 2009
    Location
    Ukraine
    Posts
    922

    Default Re: Logic Hooks and Retrieve Data from other PHP files

    Hello,
    It is not clear for me.
    Letrium ltd. - Only high quality service
    http://letrium.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Logic Hooks
    By Rajesh Patel in forum Help
    Replies: 6
    Last Post: 2009-11-18, 05:57 PM
  2. After retrieve logic hook
    By Rajesh Patel in forum Help
    Replies: 0
    Last Post: 2009-10-27, 11:28 AM
  3. Logic Hooks
    By highres in forum Italiano
    Replies: 3
    Last Post: 2009-02-01, 05:10 PM
  4. Logic Hooks
    By marketadvantage in forum Developer Help
    Replies: 3
    Last Post: 2009-01-30, 03:09 PM
  5. logic hooks
    By user1000 in forum Developer Help
    Replies: 3
    Last Post: 2008-05-06, 07:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •