Query to get Details of Request from Email
Version:11027
DB:PGSQL
Output:
Select wo.WORKORDERID As "Request ID",
ucinfo.EMAILID AS "Email From",
wor.recipient_email AS "Email Address",
wor.to_cc_bcc AS "To/CC/BCC" from workorder_recipients wor
LEFT JOIN Workorder wo on wor.WORKORDERID = wo.workorderid
LEFT JOIN WorkOrderStates wos on wo.WORKORDERID = wos.WORKORDERID
LEFT JOIN StatusDefinition std on wos.STATUSID = std.STATUSID
LEFT JOIN PortalUsers ptu on wo.requesterid = ptu.USERID
LEFT JOIN SDUser sduser ON ptu.USERID=sduser.USERID
LEFT JOIN AaaUser aaauser ON sduser.USERID=aaauser.USER_ID
LEFT JOIN AaaUserContactInfo user_contact ON aaauser.USER_ID=user_contact.USER_ID
LEFT JOIN AaaContactInfo ucinfo ON user_contact.CONTACTINFO_ID=ucinfo.CONTACTINFO_ID
where wo.ISPARENT = '1'
NOTE : Kindly use the date filter to avoid performance issue.
- Here is the example for getting this week data - CREATEDTIME >= <from_thisweek> AND CREATEDTIME <= <to_thisweek>
- <from_thisweek> - Starting date of this week
- <to_thisweek> - Ending date of this week
- Available Date Templates
- Today - <from_today> - <to_today>
- This week - <from_thisweek> - <to_thisweek>
- Last week - <from_lastweek> - <to_lastweek>
- This month - <from_thismonth> - <to_thismonth>
- Last month - <from_lastmonth> - <to_lastmonth>
- This quarter - <from_thisquarter> - <to_thisquarter>
- Last quarter - <from_lastquarter> - <to_lastquarter>
- Yesterday - <from_yesterday> - <to_yesterday>
New to ADSelfService Plus?