Ivan1
12 May 2022 15:46
1
Hello,
After the second save bean I can’t get the field:
$bean= BeanFactory::newBean('my_project');
$bean->name="test";
$bean->save();
.......
$bean->name="test1";
$bean->save();
$created_date=$incident->date_entered;
then $created_date is null
Even if I do before that $bean= BeanFactory::newBean(‘my_project’, $bean->id);
$created_date will still be null
Are you creating this inside a logic hook?
if true. Then I will recommend to use other word from instead of $bean as that is already used by the current bean.
Ivan1
26 May 2022 22:02
3
No, it’s part of a custom API
Got it. Sorry that’s not my expertise. Please check these links. Hope they can give you an idea on how to solve your issue:
Hi there, im attempting to add a form to post leads to SuiteCRM but i cant seem to get datetime to go over no matter what i try. I found something relating to SugarCRM where they say it needs to be posted in this format
2020-10-19T21:21:00-04:00
but no matter what i do the datetime field is always empty on creation.
here’s my code
` $('#submitButton').on('click',function(){
d = new Date($('#event_date').val())
console.log(d)
var eventDateField = document.getElementById("event_…
Hi,
I am trying to set calls through API.
Using V8 APi and SuiteCRM Version 7.11.13
New records are created with all data that passed, except the date_start and date_end, that are saved empty.
What could be a problem?
I am formatting the date time to ISO format like this:
$datetime = new DateTime('2020-08-02 14:00');
$converted_call_time = $datetime->format('c');
This code produces formatted date like this:
2020-08-02T14:00:00+03:00
And this is a value that passed to API.
Any help will…
Ivan1
27 May 2022 09:24
5
Thanks for the answer, but there cases when trying to write down time are considered. I just want to read the already recorded time.
So far, only such a temporary solution: I create a variable where I write the time after the creation of the Bean and later read it
for future readers maybe try “$bean->fetched_row[‘date_entered’]”