You need to sign in to do that
Don't have an account?
rwalrath144
string EmailAddress_Value = c.Description.substring( EmailAddressMatchIdx + EMAILADDRESS_TXT.length() );
c.Consumer_Contact_Email__c = EmailAddress_Value;
integer IPAddressMatchIdx = c.Description.indexOf( IPADDRESS_TXT );
string IPAddress_Value = c.Description.substring( IPAddressMatchIdx + IPADDRESS_TXT.length() );
c.IP_Address__c = IPAddress_Value;
integer Address1MatchIdx = c.Description.indexOf( ADDRESS1_TXT );
string Address1_Value = c.Description.substring( Address1MatchIdx + ADDRESS1_TXT.length() );
c.Address_1__c = Address1_Value;
integer Address2MatchIdx = c.Description.indexOf( ADDRESS2_TXT );
string Address2_Value = c.Description.substring( Address2MatchIdx + ADDRESS2_TXT.length() );
c.Address_2__c = Address2_Value;
This is the error that I am getting: >>> cs_tools@d-2ip80vhgddefok4cnbidggn93.in.sandbox.salesforce.com >>> (Undelivered): 554 System.DmlException: Insert failed. First >>> exception on row 0; first error: >>> CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, CheckFieldValues: data changed >>> by trigger for field Consumer Contact Email: invalid email address: >>> sarah.mccarthy@ymail.com | Address 1: (Senders address) | Address >>> 2: (Recipient Address) | End:End | this is the actual test of the
Trigger to create a case from an email keeps erroring
I am having a really hard time with one piece of code. I have created a class to take incoming emails and create a case. A trigger will fire before insert that reads the email and updates fields in the case with the appropriate values. I keep getting an error on the following code.
integer EmailAddressMatchIdx = c.Description.indexOf( EMAILADDRESS_TXT );
string EmailAddress_Value = c.Description.substring( EmailAddressMatchIdx + EMAILADDRESS_TXT.length() );
c.Consumer_Contact_Email__c = EmailAddress_Value;
integer IPAddressMatchIdx = c.Description.indexOf( IPADDRESS_TXT );
string IPAddress_Value = c.Description.substring( IPAddressMatchIdx + IPADDRESS_TXT.length() );
c.IP_Address__c = IPAddress_Value;
integer Address1MatchIdx = c.Description.indexOf( ADDRESS1_TXT );
string Address1_Value = c.Description.substring( Address1MatchIdx + ADDRESS1_TXT.length() );
c.Address_1__c = Address1_Value;
integer Address2MatchIdx = c.Description.indexOf( ADDRESS2_TXT );
string Address2_Value = c.Description.substring( Address2MatchIdx + ADDRESS2_TXT.length() );
c.Address_2__c = Address2_Value;
This is the error that I am getting: >>> cs_tools@d-2ip80vhgddefok4cnbidggn93.in.sandbox.salesforce.com >>> (Undelivered): 554 System.DmlException: Insert failed. First >>> exception on row 0; first error: >>> CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, CheckFieldValues: data changed >>> by trigger for field Consumer Contact Email: invalid email address: >>> sarah.mccarthy@ymail.com | Address 1: (Senders address) | Address >>> 2: (Recipient Address) | End:End | this is the actual test of the
>>> script Class.cases.handleInboundEmail: line 41, column
Is your code able to catch the email in your org.
(using Emailservice - i faced a loddds of problem using Emailservice)
so my question here is does your code on email catch is working -
if yes then please check the permissions for this object
The error you provided means
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
You do not have permission to create, update, or activate the specified record.
* there was a error in slaesforce.com - So in production salesforce.com was treating this lonnnng email
id as spam in your case cs_tools@d-2ip80vhgddefok4cnbidggn93.in.sandbox.salesforce.com
The email opens a case in my org using email services. My goal is to have the trigger read the email and fill in the appropriate fields in the case. Example: Email says the incident reason is Order not Recieved, then the field Incident Reason is filled in with Order not Recieved.
The object Cases has full permissions.
That doesn't make sence, that email address is the one given to me by Salesforce when I set up the email services in Sandbox.
I have a friend helping me with this. His theory is that when the trigger reads the email it doesn't know when to stop looking for the values.
This is the entire trigger code:
Just inbound emails are being processed. We have an order tool for the company and we are going to set it up where the order tool sends an email template that I write up containing the information from the order. The email will then create the case and populate the fields. The email template is below:
Can somebody assist with the comment above?
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
You do not have permission to create, update, or activate the specified record.
* there was a error in slaesforce.com - So in production salesforce.com was treating this lonnnng email
id as spam in your case cs_tools@d-2ip80vhgddefok4cnbidggn93.in.sandbox.salesforce.com
How do I fix these two issues?
The last test didn't yield any additional errors but these two.