Blocking mail if custom field defined

Hi All

Im having a bit of a scrip problem and would appreciate any thoughts.

I have a custom field which only gets populated under very specific
conditions (we have a method of auto filling a lot of the ticket info for
certain issues which means we only have to fill in the requestor). The field
is called ‘Quick’ and will either be blank or have the word “quick” in it.
Ive tried to create a scrip on the queue all of these tickets go to, so that
when a “Quick Ticket” is created it doesnt send out a mail.

My scrip conditions are:

Condition: User Defined
Action: Notify Requestors and Cc
Template: Global Template: Autoreply
Stage: TransactionCreate

Custom Condition:

if ($self->TransactionObj->Type eq “Create”)
{
if (defined $self->TicketObj->CustomFieldValues(‘Quick’)->Next)
{
return 0;
} else {
return 1;
}
}

Which I thought would do the job, but it doesnt seem to fire. Any thoughts
would be greatly appreciated

regards

Garry

Dr Garry Booth
IT Services
Loughborough University

Hi All

if ($self->TransactionObj->Type eq “Create”)
{
if (defined $self->TicketObj->CustomFieldValues(‘Quick’)->Next)

if ( $self->TicketObj->FirstCustomFieldValue(‘Quick’) )

should works

Hi All

if ($self->TransactionObj->Type eq “Create”)
{
if (defined
$self->TicketObj->CustomFieldValues(‘Quick’)->Next)

if ( $self->TicketObj->FirstCustomFieldValue(‘Quick’) )

should works

Hi Emmanuel,

Thanks for this. Oddly it works perfectly for me, but if you create the case
and you’re a watcher of the queue into which the case goes it still sends
the autoreply.

Dont suppose you’ve any thoughts?

regards
garry

Dr Garry Booth
IT Services
Loughborough University