This topic contains 4 replies, has 2 voices, and was last updated by shreyas 7 years, 7 months ago.
- Topic
Hi Team ,
We have a requirement wherein i need to send email to Customers(Leads) once a appointment to a context(Customer) is set by creating a calendar event.This is a similar requirement that was done for automatic email triggering when a lead is created which was handled using Processes (link for reference : Automatic mail trigger when Lead Created using process.yml.
Here i tried to go with processes but i am not knowing how to access the context’s email as only context’s name would be displayed in Calendar Event form. I also tried looking at Database structure for this wherein Context/lead mapping for this calendar events are done separately in a relation table which is linked with calendar event Id.Please find the Database structure screenshots for Calendar Event & relation table(oro_rel_46a29d1988a3cef5d4431f) given below:
I also tried going through the calendar Event form type wherein Its using a field called childEvents to display the contexts.
Please find the form type of Calendar Event given below: (Proj_Dir\vendor\oro\platform\src\Oro\Bundle\CalendarBundle\Form\Type\CalendarEventType.php)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384public function buildForm(FormBuilderInterface $builder, array $options){$builder->add('title','text',['required' => true,'label' => 'oro.calendar.calendarevent.title.label'])->add('description','oro_resizeable_rich_text',['required' => false,'label' => 'oro.calendar.calendarevent.description.label'])->add('start','oro_datetime',['required' => true,'label' => 'oro.calendar.calendarevent.start.label','attr' => ['class' => 'start'],])->add('end','oro_datetime',['required' => true,'label' => 'oro.calendar.calendarevent.end.label','attr' => ['class' => 'end'],])->add('allDay','checkbox',['required' => false,'label' => 'oro.calendar.calendarevent.all_day.label'])->add('backgroundColor','oro_simple_color_picker',['required' => false,'label' => 'oro.calendar.calendarevent.background_color.label','color_schema' => 'oro_calendar.event_colors','empty_value' => 'oro.calendar.calendarevent.no_color','allow_empty_color' => true,'allow_custom_color' => true])->add('reminders','oro_reminder_collection',['required' => false,'label' => 'oro.reminder.entity_plural_label'])->add('childEvents','oro_calendar_event_invitees',['required' => false,'label' => 'oro.calendar.calendarevent.invitation.label'])->add('notifyInvitedUsers','hidden',['mapped' => false]);$builder->addEventListener(FormEvents::PRE_SET_DATA, [$this, 'preSetData']);$this->subscribeOnChildEvents($builder);}Please need help in knowing how to go about with this, to trigger automatic mail to Customers(i.e Lead/Context & also if possible to Guests selected) who are related to the Calendar Event once a Calendar Event is created.
Thanks & Regards,
Shreyas S
The forum ‘OroCRM’ is closed to new topics and replies.