Example of custom condition for scrip?

Hi,

Anybody has example code showing how to implement a custom condition
that would filter based on Requestor email ?

I’d like to replace the “On Create” by
something like:

re-implement the code to verify " On Create ", and add

if ( not $self->TicketObj->Requestors->MemberEmailAddresses =~ m/domain.com$/
) {

abort action

return undef;

} else {

execute action

return 1
};

Thanks,

Gilles-Eric DESCAMPS