Menu

Which "states" can be used for triggers

2014-07-04
2014-07-08
  • Henk Tittel

    Henk Tittel - 2014-07-04

    I am working on the mail notifications, I was able to get to work a trigger with state closed and with state assigned.
    I would like to create a trigger which send a mail upon creating the user reguest, I tried the state "create" and "created" but both fail.

    Any ideas?

    Kind regards,

    Henk

     
  • Denis

    Denis - 2014-07-04

    Hi Henk,

    The state is named "new", but the "Trigger on entering state" will not work in this case. You have to use the specific type of trigger: "Trigger on object creation" for this purpose.

    Denis

     
  • Henk Tittel

    Henk Tittel - 2014-07-04

    Hi Dennis,

    TY for your reply, one last question:

    I added: SELECT Person WHERE id = :this->agent_id, but no mail is sent, it says no recipient, which I think to understand since the ticket is not yet assigned to an agent (still figuring out how to assign all user requests directly to an agent) so what should I use instead of SELECT Person WHERE id = :this->agent_id?

     
  • George Dedas

    George Dedas - 2014-07-08

    you should use a regular address, like paok@gmail.com...when a request is 'New' the agent_id is undefined

     
  • Henk Tittel

    Henk Tittel - 2014-07-08

    Hi George,
    Silly me, I thought it had to be OQL language :)
    So I used:

    SELECT Person AS p
    JOIN lnkPersonToTeam AS l1 ON l1.person_id=p.id
    JOIN Team AS t ON l1.team_id=t.id
    WHERE t.name = "Customer Support"

    Which is working too, anyway, many thanks for replying.

    Kind regards,

    Henk

     

Log in to post a comment.

MongoDB Logo MongoDB