Re: How to update a non-mass update field on a mass update
OK. Yeah, I see what you mean. My code did in fact properly update the decision_sent_date field. The problem was though that in SugarBean.php, when it runs it's UPDATE query, it overwrites the value that I stored and replaces it with NULL. Not sure why or if this is a known Sugar issue.
Anyway, I tried your suggestion and it does help. The only problem is that the value that gets stored for decision_sent_date on my last run was "2000-01-01 05:00:00.000". Any thoughts?
I thought it might be a formatting issue, so I changed your command to now read:
PHP Code:
$bean->decision_sent_date = date("Y-m-d H:i:s",$GLOBALS['timedate']->dbDayFormat);
But that didn't work either. I end up with a value of NULL if I write the command that way. Any thoughts on why this is happening?
Also, is there anyway to determine what the user's datetime settings are so that I don't have to hardcode in this value? Something similar to $GLOBALS['timedate']->dbDayFormat, but for the user's setting and not the db setting?
Last edited by hadoob024; 2010-12-15 at 04:44 PM.
-hadoob024-
Windows 7 SP1
PHP 5.2.17
SQL Server 2008 R2
IIS 7.5
Sugar Professional Version 5.5.1
Bookmarks