You need to sign in to do that
Don't have an account?
Yuvi Trial
Capture records from web-to-lead and store it in custom objecct
Hi All,
When web-to-lead record is rejected based on validations , That records must be capture the values for all fields on the custom object.
I have tried with @future, SaveResult concept to capture web-to-lead records, But unable to capture rejected web-to-lead records by validations.
When web-to-lead record is rejected based on validations , That records must be capture the values for all fields on the custom object.
I have tried with @future, SaveResult concept to capture web-to-lead records, But unable to capture rejected web-to-lead records by validations.
Webtolead and webtocase are inbuilt mechanisms and thus provide very less options when dealing with any validation errors.
However, there are workarounds to it:
1. Instead of prebuilt webtolead, you can use inbound email handler class, that can do a lot of business logic handling for your validations and can add error records in custom objects.
2. If you have just 2-3 validation fields, then you can modify validation itself so that validation is applied only for other scenarios and not for web-to-lead records. Just in case, that fits your requirement.
I have added LastName, Company, LeadStatus, Email, Phone in the Web-to-Lead form.
Also implementing validation i.e while creating the lead, If LeadStatus is Working-Contacted. Error message will display.
While submitting the form with leadstatus = Working-Contacted, Validation rule wont allow to store the lead records into the salesforce. I want to store all the records which has the LeadStatus is Working-Contacted to the Custom Object.
Here my question is Whether it is possible or not? If Possible, How to capture those records and store in Custom Object?
In your Scenario, create a checkbox in the lead object. also change the validation rule such that In the web page use the hidden field which will mark the checkbox value as true. and remove the checkbox__C field from the standard pagelayout.
Hope this solution works well in your scenario.
Let me know with the errors if you face any ,
Regards,
Sai Krishna Tavva.
I have placed the checkbox which is not visible in page layout and wrote the validation rule as you mentioned. While i'm submitting the web-to-lead form, that form's record will be rejected due to validation rule. So it won't store inside the lead instead of that I want that rejected record to be captured in Custom Object. Still i am not able to find the solutions.