You need to sign in to do that
Don't have an account?
Tugay Topju 4
Creating a trigger which will take the data from Leads Object to a custom Object
Hi, so our salesforce system has a custom object, what we need to do is transfer the information from the Lead object to our custom object called momentum_Prospect__c . The trigger has to run when data has been added to the Lead Object from the web 2 Lead form. Does anybody have any idea how this can be executed? Please help!
Type "Process Builder" in Quick Find box.
Click on "Process Builder".
Create New Process
Select Object -> Leads
Add your condition
In Immediate action box -> add -> Action Type = insert Record
select record type -> momentum_Prospect__c.
Add fields that you want to populate, in Type select Reference and select corresponding lead fields.
For example:
https://developer.salesforce.com/trailhead/en/business_process_automation/process_builder
If this solves your problem, Select this Best Answer
First you need to identify the field which tells that this lead is coming from web to lead. Maybe if lead source equals 'Web Form', then you can consider it as a web to lead. You need to populate this lead source in your web to lead form by using hidden fields. Once this is done, you can create a process builder as suggested by Mritzi or you can write a trigger on lead object to insert records in Momentum_Prospect__c object,
I guess you can now write a trigger on Lead object and create your custom record whenever a lead is created.
Create new Process
At 3 -> select Lead ( Start the process -> only when a record is created, )
At 4 -> select criteria ( Criteria for executing actions -> filter conditions are met. You can have a hidden field on web-form whose value indicates that lead has been created from Web-from, or any means using which you can determine that the record has been created from web-form)
At 5 -> (Immediate Action) -> Add Action (Don't select scheduled action, something like 0 hours, 1 hours or 1 month after record creation)
Record type- > Momentum_Prospect__c
Below that a form would open wherein you have map fields of Momentum_prospectus__c to the reference of corresponding fields of Lead.
Remember: You have make it sure that all the required fields of Momentum_Prospectus__c are atleast mapped to corresponding Lead fields.
If it helps, mark it as Best Answer.
If this helps you out, please mark this Best Answer