Custom Email script sends email to just one person
search cancel

Custom Email script sends email to just one person

book

Article ID: 417543

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

  • A custom Email Script is being developed
  • It contains a query that fetches Email ID based on a set of criteria
  • An extract from this query is as follows:
    • LEFT JOIN srm_resources r ON r.id = i.manager_id
  • i is aliased for inv_investments

Cause

The query fetches only one Email Address. Therefore Email is sent to only one person.

Resolution

  • The join condition in the query is wrong. It should instead be as follows:
    • LEFT JOIN srm_resources r ON r.user_id = i.manager_id