After changing any field and saving, suitecrm gives this error
Fatal error: Call to a member function asDb() on boolean in /var/www/vhosts/crm/httpdocs/modules/Calls/Call.php on line 187
below the line 187
$this->date_end = $td->modify("+{$this->duration_hours} hours {$this->duration_minutes} mins")->asDb(); row 187 module/Calls/call.php
I fixed removing ->asDb() from the line.
I believe it is not the optimal solution, someone can tell me how to effectively solve?
You wont believe the simple fix to this… is to make sure that all there required fields have a value and your hours has a value of 0. I suggest that you go into the calls module and make the default 0 hours so that you dont have to do that in the future.
You can revert your code and put your ->asDb() back in.
I am curious as to why people get calls created without Start dates, that shouldn’t happen. In one case, it was because the user removed those fields from the screen in Studio, so the validation requiring that field didn’t work.
In my case, it was because I was creating the call in a Workflow, and neglecting to include the required “Start date” field.
Are there any other reasons why you would have a call without that field filled in the database?