Project Checklist - How to Set BPM Email to Assigned Person

Calvin - Thanks! YES, it worked! That tip (and thread) is golden.

Here’s what I used for the PersonID:

Db.ProjectTask.Where( r =>r.Company == callContextClient.CurrentCompany && r.ProjectID == ttProjectTaskRow.ProjectID && r.Description == "MASTER AGREEMENT" ).Select( r =>r.PersonID).FirstOrDefault()

And for the Email Address (note, it errored first time since I used r.EmailAddress, instead of r.EMailAddress):

Db.Person.Where( r =>r.Company == callContextClient.CurrentCompany && r.PersonID == PersonID).Select( r =>r.EMailAddress).FirstOrDefault()

Is it bad that I named my variable PersonID, which is the same as Person.PersonID?

And if it helps anyone else, I needed the .FirstOrDefault() at the end, otherwise it would error out with "Result of expression cannot be assigned to variable of ‘System.String’ type.

I like the .DefaultIfEmpty("") tip - I’ll add that too. Will that cause it to error out if email is set to synchronous (and drive someone to let IT know that the person needs an email)?