Is this the correct way to send an mail.

Certified Senior Developer

As shown in the above image i have a record table and from this record table i have to retrieve the fields recruiter and candidateID so i can send e-mails to them.

This was my code for retrieving the data from the fields and then sending them automated emails. But, i am not getting any mails. Can anyone please help me about where i went wrong so i can rectify it.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to skzahed_09

    Did you try putting your second "toemailaddress()" with the internal "a!queryRecord().data" into an empty expression rule editor to see what its output would be? 

    My first guess is that the result will be nonsensical, because the result of that query expression as-written will not possibly result in an email addresss (and all "toemailaddress()" does is take an email address as text and convert it to the "Email Address" data type for use in the send e-mail smart service).

  • 0
    Certified Lead Developer
    in reply to skzahed_09

    Query entity’s field attribute should have the record field reference which stores email of recruiter. As Mike suggested, test the query entity’s field attribute independently in an expression rule to verify data returned by it and adjust code to achieve recruiter email!

    The recruiter field has the recruiters data like (Recruiter ID, Name, Mail, Phone, DOB)

    Also, in your process model can you see the data correctly for candidateMail field in the process variable?