You need to sign in to do that
Don't have an account?
Mit Patel
InboundEmailHandler::handleInboundEmail ( ) is this method Thread Safe?
Hi All,
I am trying to insert lead record through salesforce Email-services
for example class method:
Global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {
Lead newLead = new Lead();
newLead.Name ='test';
insert newLead;
system.debug('----newLead----'+newLead);
}
Now,On Lead Object before insert - update trigger will execute.
After finishing trigger lead record should get created but it doesn't create record and doesn't show debug.
When i make trigger In-Active then it's working fine.
i have resolved this.
All Answers
Thanks kiran.
There is no any issue in trigger .
trigger on lead (before insert , before update)
for(Lead l : trigger.new)
{
if(trigger.isInsert){
l.datefield = Date.today ();
}
else
{
l.datefield = Date.valueOf(l.createdDate.format('yyyy-MM-dd'));
}
i have resolved this.