TypeError: Cannot read property “namedValues” from undefined. (line 20, file “Code”)

Here’s the script. It’s been running great for over a year, but just recently stopped working.

—————————————————————
function sendFormByEmail(e)
{
// Remember to replace XYZ with your own email address
var email = “todd.levin@funleys.com, emailtosalesforce@2kmxfxb43fsskzeusedksjxeavonvzpnwlkbf9wyynw0cjas11.a-yg5xmac.na11.le.salesforce.com”;

// Optional but change the following variable
// to have a custom subject for Google Docs emails
var subject = “Funley’s Sample Form Submitted”;

// The variable e holds all the form values in an array.
// Loop through the array and append values to the body.

var s = SpreadsheetApp.getActiveSheet();
var headers = s.getRange(1,1,1,s.getLastColumn()).getValues()[0];
var message = “”;

// Credit to Henrique Abreu for fixing the sort order

for(var i in headers)
message += headers[i] + ‘ = ‘+ e.namedValues[headers[i]].toString() + “\n\n”;

// This is the MailApp service of Google Apps Script
// that sends the email. You can also use GmailApp here.

MailApp.sendEmail(email, subject, message);

// Watch the following video for details
// http://youtu.be/z6klwUxRwQI

// By Amit Agarwal – www.labnol.org
}
—————————————————————

Hi!

Thank you very much for your fabulous website! I’d need to assign different Google spreadsheets with different people. I’d know if is it possible to do this with Google scripts, something like:
=setFileSharing(“ID to be shared”; “googleaccountdestination@gmail.com”)

Thank you!

I purchased the premium version of Mail Merge. I run several different accounts through Google. It appears that the premium version got attached to my personal Gmail account and I cannot attach to my google contacts in the business account.

How does all of this work? I need to be able to use this attached to the business account for setting it up and then transfer this to 3 or 4 other users in the office.

Do each of them need to have this attached to their Google accounts run through my Google app admin account?

You have mentioned that the 100 a day limit will grow after a billing cycle or so. Do you know how long this takes?

Please advise.

Chris

I recently redesigned my my WP site and moved it from a development URL to the permanent location. Afterward, I noticed that I have been change or undo Categories. I use Thesis 2.1 Theme, but changed to default theme 2015 to test. I also deactivated all plugins. The problem seems to be in WordPress or maybe is related to moving the database. I can’t find any reference to this problem anywhere.

In addition to the basic problem with Categories, I am also unable to change Custom Templates or delete old Thesis Skin backups. Even though only the Category problem is strictly a WordPress issue, I thought I’d mention it.

I discovered your site while seeking solutions and am impressed by your knowledge and range of services. Thank you for letting me know if you have any ideas about what might be causing the problem.

A friend of mine asked me if I knew how to restore his password on his Samsung Galaxy S5. I didn’t know what to answer because I haven’t used an S5. But I thought an easiest way how to get into his phone is by resetting it to its factory default settings, but doing so will lose its data and personal files, including apps manually installed. He didn’t want to lose all his personal files.

So I thought, aren’t all Android phones the same? Whether this be a Samsung Galaxy S5 or Nexus or HTC.

Hi Amit,
In this era of NSA Prism, the concept of a personal diary where you can write your thoughts and experience is threatened. So, I am looking for an Encrypted Diary. Or just an encrypted notepad where we can sort by date and search for keywords like Evernote. But the main point is some standard trusted encryption. It would be great if it could be a great article in labnol. I personally have a MacBook Pro. But a cross-platform app that can run portable might be the most secure solution. But I lack technical skills and I hope with your skill and popularity, you can find the right app or atleast get a opensource project started for it.

Thank you.
ak

Hi Amit,

Thank you so much for your scripts. I have successfully received the form notification containing form info. However, at the same time, I received the system notification indicating the changes too. I really don’t want the system default notification, since then my email box will be stuck with hundreds useless emails. Is there any way to deactivate the system default email notification and only keep the personalized one with form exact info?

Thank you very much,
Lychee

I keep getting this error: You do not have permission to perform that action.

I have used with no issues before, cannot think what the problem would be. This program is a lifesaver for me for my work. Thanks for your help!