 |
vtiger The Honest Open Source CRM
|
| Previous topic :: Next topic |
| Author |
Message |
philmarsay
Joined: 10 Oct 2005
Posts: 15
|
| Posted: Fri Nov 11, 2005 7:33 pm Post subject: New Module I've created saves with no smcreator, smowner? |
|
|
I have created a basic new module.
I am getting there in terms of getting things working, but for some reason, when a record for this new entity is saved in the database, the fields for smcreator and smowner are set to "0" in the crmentity table?
How do I get these fields to be set to the user that created the entity?
Thanks.
Phil M |
|
| Back to top |
|
mikecrowe
Joined: 04 Jan 2005
Posts: 499
|
| Posted: Thu Nov 17, 2005 5:15 am Post subject: New Module I |
|
|
Phil,
Did you solve? The save routine eventually goes to data/CRMEntity.php and calls insertIntoCrmEntity().
Code: if($_REQUEST['assigntype'] == 'T')
{
$ownerid= 0;
}
else
{
$ownerid = $this->column_fields['assigned_user_id'];
}
(snip)
$sql = "insert into crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values('".$current_id."','".$current_user->id."','".$ownerid."','".$module."',".$description_val.",'".$date_var."','".$date_var."')";
$adb->query($sql);
Make sure you have assigned_user_id as one of your colum fields, and work your way through that routine.
Does that help? |
|
| Back to top |
|
Guest
|
| Posted: Thu Nov 17, 2005 11:41 am Post subject: Re: New Module I've created saves with no smcreator, smowner |
|
|
thanks, I will try that, I have no assigned_user_id field in my basic module, and the lack of this field does seem to be causing other problems elsewhere, so I will add it and see how I get on.
Thanks for the tip!
Regards,
Phil. |
|
| Back to top |
|
| |
|