Justman
|
| Posted: 01/04/2005, 1:03 AM |
|
Hello fellows,
I have two custom php functions that works well without CCS.
I copied the two functions to Common.php file in CCS and tried to call them in Before_insert custom code but I get the error "Fatal error: Call to undefined function:"
Do I have to put any tags to the functions for CCS to recognise them?
Please let me know if you have some suggestions.
Thanks,
Justman
|
|
|
 |
Don Safar
|
| Posted: 01/04/2005, 1:20 AM |
|
You should be able to call the custom functions without problem. Make sure
you did full publish (so common gets re-generated). Please post the line of
code where you call the functions.
"Justman" <Justman@forum.codecharge> wrote in message
news:541da5bf431622@news.codecharge.com...
> Hello fellows,
>
> I have two custom php functions that works well without CCS.
> I copied the two functions to Common.php file in CCS and tried to call
> them in
> Before_insert custom code but I get the error "Fatal error: Call to
> undefined
> function:"
>
> Do I have to put any tags to the functions for CCS to recognise them?
>
> Please let me know if you have some suggestions.
>
> Thanks,
> Justman
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Justman
|
| Posted: 01/04/2005, 2:35 AM |
|
Hi Don,
I have done full generation and the error still comes up with seeing the functions.
Here are the code that I am using:
CUSTOM CODE IN BEFORE INSERT EVENT:
$result = "testing";
$new_id = $customer_parent1->view_point_parent_desc->GetValue();
$fresh_new = customer_desc_1($new_id, $result);
$customer_parent1->ds->customer_parent_desc->SetValue($fresh_new );
COMMON.php
// Custom function
function customer_desc1($views, $title)
{
......
.....
.....
}
return $result;
The function name is : customer_desc_1
Quote Don Safar:
You should be able to call the custom functions without problem. Make sure
you did full publish (so common gets re-generated). Please post the line of
code where you call the functions.
"Justman" < Justman@forum.codecharge> wrote in message
news:541da5bf431622@news.codecharge.com...
> Hello fellows,
>
> I have two custom php functions that works well without CCS.
> I copied the two functions to Common.php file in CCS and tried to call
> them in
> Before_insert custom code but I get the error "Fatal error: Call to
> undefined
> function:"
>
> Do I have to put any tags to the functions for CCS to recognise them?
>
> Please let me know if you have some suggestions.
>
> Thanks,
> Justman
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Justman
|
| Posted: 01/04/2005, 2:36 AM |
|
Quote Justman:
Hi Don,
I have done full generation and the error still comes up without seeing the functions.
Here are the code that I am using:
CUSTOM CODE IN BEFORE INSERT EVENT:
$result = "testing";
$new_id = $customer_parent1->view_point_parent_desc->GetValue();
$fresh_new = customer_desc_1($new_id, $result);
$customer_parent1->ds->customer_parent_desc->SetValue($fresh_new );
COMMON.php
// Custom function
function customer_desc1($views, $title)
{
......
.....
.....
}
return $result;
The function name is : customer_desc_1
Quote Don Safar:
You should be able to call the custom functions without problem. Make sure
you did full publish (so common gets re-generated). Please post the line of
code where you call the functions.
"Justman" < Justman@forum.codecharge> wrote in message
news:541da5bf431622@news.codecharge.com...
> Hello fellows,
>
> I have two custom php functions that works well without CCS.
> I copied the two functions to Common.php file in CCS and tried to call
> them in
> Before_insert custom code but I get the error "Fatal error: Call to
> undefined
> function:"
>
> Do I have to put any tags to the functions for CCS to recognise them?
>
> Please let me know if you have some suggestions.
>
> Thanks,
> Justman
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Justman
|
| Posted: 01/04/2005, 3:04 AM |
|
Thanks Don.
I have figured out the problem. The functions in the source Common.php file were not included in the published Common.php file. So I closed down the project, deleted the published common.php and when I regenerated the project again, the new published Common.php included the function and it worked.
Thanks again.
Justman
Quote Justman:
Quote Justman:
Hi Don,
I have done full generation and the error still comes up without seeing the functions.
Here are the code that I am using:
CUSTOM CODE IN BEFORE INSERT EVENT:
$result = "testing";
$new_id = $customer_parent1->view_point_parent_desc->GetValue();
$fresh_new = customer_desc_1($new_id, $result);
$customer_parent1->ds->customer_parent_desc->SetValue($fresh_new );
COMMON.php
// Custom function
function customer_desc1($views, $title)
{
......
.....
.....
}
return $result;
The function name is : customer_desc_1
Quote Don Safar:
You should be able to call the custom functions without problem. Make sure
you did full publish (so common gets re-generated). Please post the line of
code where you call the functions.
"Justman" < Justman@forum.codecharge> wrote in message
news:541da5bf431622@news.codecharge.com...
> Hello fellows,
>
> I have two custom php functions that works well without CCS.
> I copied the two functions to Common.php file in CCS and tried to call
> them in
> Before_insert custom code but I get the error "Fatal error: Call to
> undefined
> function:"
>
> Do I have to put any tags to the functions for CCS to recognise them?
>
> Please let me know if you have some suggestions.
>
> Thanks,
> Justman
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|