newBean of Meeting record

Hello again,

I have a hard time generating a meeting record through an entrypoint.

I can generate the newBean for the meeting but I cannot define the Subject (name) or define the related account in the meeting.

the other values ​​enter correctly in the new record.

me a Jr developer and I’m using the google translator

if (($_REQUEST["status"] == "confirm") && ($meeting == 1)) {

$meeting = BeanFactory::newBean("Meetings");
$metting->name = 'Test'; // not ok
$meeting->date_start = $_REQUEST["event_date"]; //ok
$meeting->confirmed_c = 1;   //ok
$meeting->parent_id = $account_id; // not Ok
$meeting->assigned_user_id = $uhash; // Ok
$meeting->enviar_modelo_c = 0; //ok

I don’t see any problems with $metting->name
but you skip

$metting->parent_type = 'Accounts';
1 Like

I made some changes.

now the only thing that doesn’t come in is parent_name.

The parent_id appears when I use chrome preview … but it does not yet contain the name of the account that is listed. Does anyone have any ideas?

if (($_REQUEST["status"] == "confirm") && ($meeting == 1)) {
$body = $bodyr;

//Cria a Reuniao
$bean= BeanFactory::newBean(“Meetings”);
$idMeeting = $bean->id;

//recupera a reuniao criada e atualiza
$newMeeting = BeanFactory::getBean(‘Meetings’, $idMeeting);
$newMeeting->name = $newMeeting->id;
$newMeeting->description = $newMeeting->id;
$newMetting->parent_type = ‘Accounts’;
$accountMeeting= BeanFactory::getBean(‘Accounts’, $account_id);
$newMeeting->parent_id = $account_id;
$newMeeting->parent_name = $accountMeeting->name; // Here, NOT ok.
$newMeeting->date_start = $_REQUEST[“event_date”];
$newMeeting->confirmed_c = 1;
$newMeeting->assigned_user_id = $uhash;
$newMeeting->enviar_modelo_c = 0;
$newMeeting->description = $accountMeeting->name; // Here, ok.

That’s not a standard field.