cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JerryH
Resolver III
Resolver III

email collection data - error in my code

Hi, please can you help me understand why my code is not working to send this data

1 ACCEPTED SOLUTION

Accepted Solutions
wyotim
Resident Rockstar
Resident Rockstar

@JerryH  I think this error is my doing! Try putting back the "Outlook" portion on the first part. So:

Office365Outlook.SendEmailV2("jerry.hald@nworld.com","Asset Fault Log Request","Equipment Fault - Call out required"
& Concat(FaultList,
"<table style='700'>
<tr>
<td><b>Client Name :</b></td><td>" & ManufacturerName & "</td></tr>" &
"<tr><td><b>Location :</b></td><td>" & LocationName & "</td></tr>" &
"<tr><td><b>Asset Description :</b></td><td>" & AssetDecription & "</td></tr>" &
"<tr><td><b>Serial Number :</b></td><td>" & 'Device Name' & "</td></tr></table></body>"),
{
Importance: "Normal"
}
)

 

My apologies for leading you astray there! I have been building apps with the Office365 connector and had that on the brain whereas you are using the Office 365 Outlook connector. That should take care of things though as that error is basically saying the function doesn't exist in the connectors you are using. Just to be safe though, let me know!

View solution in original post

10 REPLIES 10
wyotim
Resident Rockstar
Resident Rockstar

Hi @JerryH!, After a quick look, I think the issues are three-fold. First, at the beginning of the HTML table you have:

"<table style=""700"">

Try this instead:

"<table style='700'>

In HTML sections where one would normally use double quotes, using single quotes will produce the desired result as it interprets the double quotes as a text string. If you want to keep the double quotes, then something like this would work:

"<table style=" & "700" & ">


Second, there is a double quote missing after the </body> tag.

 

The third is with the IsHtml and Importance sections at the end of your code. Try wrapping that part in curly braces like so:

{
    IsHtml: true,
    Importance: "Normal"
}

 
I should also mention that the Office365.SendEmail is being depreciated so using Office365.SendEmailV2 would ensure that this part of your app doesn't break in the future. It will look much the same as your current statement but without the IsHtml: true part.

 

Feel free to let me know if that does or doesn't fix things for you! I'm happy to check further and see what I missed the first time!

Thank you for the speedy response. I have completed your suggestions but there is still a niggle somewhere

 

 
 
wyotim
Resident Rockstar
Resident Rockstar

@JerryH  I think I see the issues, so we'll give it another try!


First, the starting statement should be "Office365.SendEmailV2(", so what you have minus "Outlook".

 

Second, there should be an end parenthesis and comma separating the email body section and the curly braced section. This should close the Concat statement and separate the body from the optional section in the curly braces.

 

Third, after the curly braced section, there should be a closing end parenthesis to close the Office365.SendEmailV2 statement. You also don't need the IsHtml property; the SendEmailV2 does HTML natively, which is nice.

 

So all together, something like this:

Office365.SendEmailV2(...
...</body>"),
{
    Imporatance: "Normal"
}
)

Try that and let me know if that sorts it out or not!

Still a niggle... Error "Invocation of unknown or unsupported function"....

 

 

Office365.SendEmailV2("jerry.hald@nworld.com","Asset Fault Log Request","Equipment Fault - Call out required"
& Concat(FaultList,
"<table style='700'>
<tr>
<td><b>Client Name :</b></td><td>" & ManufacturerName & "</td></tr>" &
"<tr><td><b>Location :</b></td><td>" & LocationName & "</td></tr>" &
"<tr><td><b>Asset Description :</b></td><td>" & AssetDecription & "</td></tr>" &
"<tr><td><b>Serial Number :</b></td><td>" & 'Device Name' & "</td></tr></table></body>"),
{
Importance: "Normal"
}
)

wyotim
Resident Rockstar
Resident Rockstar

@JerryH  I think this error is my doing! Try putting back the "Outlook" portion on the first part. So:

Office365Outlook.SendEmailV2("jerry.hald@nworld.com","Asset Fault Log Request","Equipment Fault - Call out required"
& Concat(FaultList,
"<table style='700'>
<tr>
<td><b>Client Name :</b></td><td>" & ManufacturerName & "</td></tr>" &
"<tr><td><b>Location :</b></td><td>" & LocationName & "</td></tr>" &
"<tr><td><b>Asset Description :</b></td><td>" & AssetDecription & "</td></tr>" &
"<tr><td><b>Serial Number :</b></td><td>" & 'Device Name' & "</td></tr></table></body>"),
{
Importance: "Normal"
}
)

 

My apologies for leading you astray there! I have been building apps with the Office365 connector and had that on the brain whereas you are using the Office 365 Outlook connector. That should take care of things though as that error is basically saying the function doesn't exist in the connectors you are using. Just to be safe though, let me know!

Thanks so much for your support.

More questions to follow.

wyotim
Resident Rockstar
Resident Rockstar

I am happy to help out! Feel free to tag me in any future posts.

Hi Wyotim, 

Hope you are well? Is there anyway you could help me with:  Insert > Media > Add Picture
I am struggling to understand it and then also attach the image to an email (the coding you helped me with)

No one has responded to my help on community

 

Add picture.PNGCapture22.PNG

wyotim
Resident Rockstar
Resident Rockstar

Hi @JerryH! I'm on it! I'll reply to your other thread, just to keep things clean in the forum. 👍

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,326)