Hi Experts,
I have the below code in my OnSuccess of a form but it isn't CC'ing the Created By.email and it isn't attaching the attachments in the email but it is in my sharepoint list, can you please advise what I need to change?
If(
Form2ChangeType.Text = "Product",
Office365Outlook.SendEmailV2( EmailListNew, "Product Change Request - Approval Required",
"Hi,<br><br>
A Product Change Request requires your initial approval. Once approved, the Change Request group email will be notified and waiting for other departments to approve before any changes are made.
<a href=https://linktoapp.com>Please click this link to Agree or Disagree.</a><br><br>
<b>ID: </b>"& Form2.LastSubmit.ID&"<br>
<b>Change Type: </b>" & Form2.LastSubmit.'Change Type'.Value&"<br>
<b>Title: </b>" & Form2.LastSubmit.Title&"<br>
<b>Part Number: </b>" &Form2.LastSubmit.'Part Number'&"<br>
<b>Description of Change: </b>" & Substitute(Form2.LastSubmit.'Description of Change', Char(10), "<br>") &"<br>
<b>Reason for Change: </b>" & Substitute(Form2.LastSubmit.'Reason for Change', Char(10), "<br>") &"<br>
<b>Implemented by Date: </b>" & Form2.LastSubmit.'Implemented By Date'&"<br>
<b>Support: </b>" & Form2SupportText&"<br><br>
Regards<br><br>
Company Name<br></br>",
{Cc: Form2.LastSubmit.'Created By'.Email};
{
Attachments: RenameColumns(
AttachFiles.Attachments,
"Value",
"ContentBytes"
),
Importance: "Normal"
}
),
Form2ChangeType.Text = "Production",
Office365Outlook.SendEmailV2( EmailListNew, "Production Change Request - Approval Required",
"Hi,<br><br>
A Production Change Request requires your initial approval. Once approved, the Change Request group email will be notified and waiting for other departments to approve before any changes are made.
<a href=https://linktoapp.com>Please click this link to Agree or Disagree.</a><br><br>
<b>ID: </b>"& Form2.LastSubmit.ID&"<br>
<b>Change Type: </b>" & Form2.LastSubmit.'Change Type'.Value&"<br>
<b>Title: </b>" & Form2.LastSubmit.Title&"<br>
<b>Description of Change: </b>" & Substitute(Form2.LastSubmit.'Description of Change', Char(10), "<br>") &"<br>
<b>Reason for Change: </b>" & Substitute(Form2.LastSubmit.'Reason for Change', Char(10), "<br>") &"<br>
<b>Implemented by Date: </b>" & Form2.LastSubmit.'Implemented By Date'&"<br>
<b>Support: </b>" & Form2SupportText&"<br><br>
Regards<br><br>
Company Name<br></br>",
{Cc: Form2.LastSubmit.'Created By'.Email};
{
Attachments: RenameColumns(
AttachFiles.Attachments,
"Value",
"ContentBytes"
),
Importance: "Normal"
}
),
Form2ChangeType.Text = "CPQ / System",
Office365Outlook.SendEmailV2( EmailListNew, "CPQ / System Change Request - Approval Required",
"Hi,<br><br>
A CPQ / System Change Request requires your initial approval. Once approved, the Change Request group email will be notified and waiting for other departments to approve before any changes are made.
<a href=https://linktoapp.com>Please click this link to Agree or Disagree.</a><br><br>
<b>ID: </b>"& Form2.LastSubmit.ID&"<br>
<b>Change Type: </b>" & Form2.LastSubmit.'Change Type'.Value&"<br>
<b>Title: </b>" & Form2.LastSubmit.Title&"<br>
<b>Description of Change: </b>" & Substitute(Form2.LastSubmit.'Description of Change', Char(10), "<br>") &"<br>
<b>Reason for Change: </b>" & Substitute(Form2.LastSubmit.'Reason for Change', Char(10), "<br>") &"<br>
<b>Implemented by Date: </b>" & Form2.LastSubmit.'Implemented By Date'&"<br>
<b>Support: </b>" & Form2SupportText&"<br><br>
Regards<br><br>
Company Name<br></br>",
{Cc: Form2.LastSubmit.'Created By'.Email};
{
Attachments: RenameColumns(
AttachFiles.Attachments,
"Value",
"ContentBytes"
),
Importance: "Normal"
}
))
;
Navigate(Home)
Thanks in advance
Dave