Help with Event is not getting created!

gemini17
Kilo Guru

I created the business rule in the developer program, training.   I lost the original Marketing Event application, so I had to start all over and created a similar M_Events application.

My script for the business rule is:

function onAfter(current, previous) {

  //This function will be automatically called when this rule is processed.

  //Add event when attendee inserted

  if(current.operation() == 'insert' && current.marketing_event.changes()) {

  gs.eventQueue('x_19025_m_events_a_attendee.added', current,

  current.marketing_event, current.email);

  }

  //Add event when marketing event changes

  if(current.operation() == 'update' && current.marketing_event.changes()) {

  gs.eventQueue('x_19025_m_events_a_attendee.deleted', previous,

  previous.marketing_event, previous.email);

  gs.eventQueue('x_19025_m_events_a_attendee.added', current,

  current.marketing_event, current.email);

  }

  //Add event when attendee deleted

  if(current.operation() == 'delete') {

  gs.eventQueue('x_19025_m_events_a_attendee.deleted', current,

  current.marketing_event, current.email);

  }

}

when I try to add attendees< I get error:

Access to event 'x_19025_m_events_a_attendee.added' from scope 'M_Events_Application' has been refused. The event is not defined.

Any help is appreciated.

Kind regards

Danny Raj

15 REPLIES 15

Inactive_Us2289
Kilo Contributor

After sometime, I losted all my changes.. so I reclaimed my instance and started over again and now that part of the course is working good. thanks for your help