You need to sign in to do that
Don't have an account?

hello friends, help me out becoz "i am beginners in apex class"
"'this code is for the particular object, where based from received mail it has to be saved to account object" //
Global class Accountcreationfrommail implements messaging.InboundEmailHandler {
Global messaging.InboundEmailResult handleinboundemail(messaging.InboundEmail email,messaging.InboundEnvelope envelope) {
messaging.InboundEmailResult a = new messaging.InboundEmailResult();
String ename=email.fromName;
String edescription=email.plainTextBody;
String eindustry=email.subject;
Account acc=new
Account(name=ename,description=edescription,industry=eindustry);
insert acc;
return a;
}
}
\\\ I dont want to mention any object \\ "if I receive an email where by received mail Record has to be created and it has to be associated to the particular object like "if i mention in the email where it has to be saved to account object or if i mention Opportunity it has to created in opportunity" how can i write a program for this help me out........
Global class Accountcreationfrommail implements messaging.InboundEmailHandler {
Global messaging.InboundEmailResult handleinboundemail(messaging.InboundEmail email,messaging.InboundEnvelope envelope) {
messaging.InboundEmailResult a = new messaging.InboundEmailResult();
String ename=email.fromName;
String edescription=email.plainTextBody;
String eindustry=email.subject;
Account acc=new
Account(name=ename,description=edescription,industry=eindustry);
insert acc;
return a;
}
}
\\\ I dont want to mention any object \\ "if I receive an email where by received mail Record has to be created and it has to be associated to the particular object like "if i mention in the email where it has to be saved to account object or if i mention Opportunity it has to created in opportunity" how can i write a program for this help me out........
For Example