Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with send mail DB rule

SOLVED
Go to solution
Highlighted
Jan Gunnar Helg
Senior Member

Problem with send mail DB rule

I am trying to create a DB rule to do the following:

Send an email to workrgroup responsible once a service call recieves a new email.

The trigger part is fine. It is the part where I try to find the workgroup resp email that fails.

First of all the "Fields" dropdown on Email DB rules does not work so I had to type it in manually.

[Service call;Assignment;To Workgroup;Workgroup responsible;E-mail]

The logs gives the following error:
gives an error when try to send mail to: <[Service call>,,,,: 501 5.5.4 Invalid Address


Am I typing it wrong or is this simply not possible?

6 REPLIES
Alexander Kriku
Frequent Visitor
Solution

Re: Problem with send mail DB rule


it's possible to get the list of members' emails via "update data from external system" action.

the external script receives the parameter "servicecall_id"
runs sql

select distinct per.per_email
from itsm_servicecalls sc
left outer join itsm_workgroups wg on wg.wog_oid = sc.ser_ass_wog_oid
left outer join itsm_members mem on mem.mem_wog_oid=wg.wog_oid
left outer join itsm_persons per on per.per_oid=mem.mem_per_oid
where per.per_email is not null
and sc.ser_id =

and sends the parameter "list_of_emails" (i.e. new custom field) back to SD.
Gurevich
Member

Re: Problem with send mail DB rule

in SP24 object Person has option "Send me e-mail when item are assigned tio my workgroup". Try to use this?
Jan Gunnar Helg
Senior Member

Re: Problem with send mail DB rule

Thanks Alexander, I was kinda fearing I had to go outside of the tool to get these datas

Thanks for the reply anyways :)
Jan Gunnar Helg
Senior Member

Re: Problem with send mail DB rule

Alexander;

Your select only gives me the email adresses for all the members of the workgroup.

I actually have a custom field (entity reference) called "Workgroup Responsible" on my workgroup form. Which allows me to link a person in as the workgroup responsible.

How would the select be to get a hold of this persons email?
Jan Gunnar Helg
Senior Member

Re: Problem with send mail DB rule

Should mention the field I use for this is ITSM_WOR_CUSTOM_FIELDS.WCF_PER1_OID
Jan Gunnar Helg
Senior Member

Re: Problem with send mail DB rule

Nevermind I managed to make it myself :P

select distinct per.per_email
from itsm_servicecalls sc
left outer join itsm_workgroups wg on wg.wog_oid = sc.ser_ass_wog_oid
left outer join itsm_wog_custom_fields resp on resp.wgc_wog_oid=wg.wog_oid
left outer join itsm_persons per on per.per_oid=resp.wgc_per1_oid
where per.per_email is not null
and sc.ser_id =[ID]
//Add this to "OnDomLoad" event