You need to sign in to do that
Don't have an account?
The Admiral
The web form
Might be a bit of a dumb question, or that nobody will answer that. It's mmkay.
But if U could guide me into right direction that would be great.
So I'm new in my company and they first task is to modify apex webform handler.
Well here it gets tricky. It needs to be modified only for 1 country. And it needs to have text added to the email that webform creates.
However it might be tricky for me, cause I really don't see where is this text coming from. Or where should it be added to.
Here is the code piece (If more info needed i can send u the whole code):
// send email to User who filled out the form
private void sendUserMail() {
String userMailMessagePlain = Label.Email_Thankyou_Message_1 + '\n' + Label.Email_Thankyou_Message_2 + '\n\n' + setPlainTextMessage('\n');
Messaging.SingleEmailMessage userMail = prepareEmail(new String[]{sfw.emailAddress}, Label.Sender_Display_Name, Label.Email_Subject_User, userMailMessagePlain);
userMail.setHTMLBody(setHTMLMessage());
if (sfw.imageFile.Name != NULL) {
userMail.setFileAttachments(new Messaging.Emailfileattachment[] { getAttachmentForEmail() } );
}
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { userMail });
I'm sure the language choice comes from this:
}
else if (sfw.language =='de') {
serviceEmailAddress = 'kalalalalala@test.com';
}
I'm quite sure it is based on:
http://www.topalovich.com/2011/12/create-a-custom-web-form-handler-with-force-com-sites/
This will be so "easy"
But if U could guide me into right direction that would be great.
So I'm new in my company and they first task is to modify apex webform handler.
Well here it gets tricky. It needs to be modified only for 1 country. And it needs to have text added to the email that webform creates.
However it might be tricky for me, cause I really don't see where is this text coming from. Or where should it be added to.
Here is the code piece (If more info needed i can send u the whole code):
// send email to User who filled out the form
private void sendUserMail() {
String userMailMessagePlain = Label.Email_Thankyou_Message_1 + '\n' + Label.Email_Thankyou_Message_2 + '\n\n' + setPlainTextMessage('\n');
Messaging.SingleEmailMessage userMail = prepareEmail(new String[]{sfw.emailAddress}, Label.Sender_Display_Name, Label.Email_Subject_User, userMailMessagePlain);
userMail.setHTMLBody(setHTMLMessage());
if (sfw.imageFile.Name != NULL) {
userMail.setFileAttachments(new Messaging.Emailfileattachment[] { getAttachmentForEmail() } );
}
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { userMail });
I'm sure the language choice comes from this:
}
else if (sfw.language =='de') {
serviceEmailAddress = 'kalalalalala@test.com';
}
I'm quite sure it is based on:
http://www.topalovich.com/2011/12/create-a-custom-web-form-handler-with-force-com-sites/
This will be so "easy"