function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
robbiejabedrobbiejabed 

routing a web to lead form to a custom tab?

I have an existing form already that connects and saves data to salesforce with no issues.  What I am trying to do is where I am having the issue.

 

We have another custom tab that i would like to store the data into from the web form if it meets certain logic.  For example:

 

If field = 'X', send lead to "leads tab", if field = 'Y' send data to "custom leads tab".  Sending data to the custom tab is where the issue lies for multiple reasons.

 

1)  I can only generate HTML for the leads tab. I can not do it for a custom leads tab.  So I can not store data in those feilds

2)  I'm assuming I need to do some APEX coding to get the leads in the custom tab as well, but need assistance with that.

 

From the looks of it, it seems that I have to put everything in the leads tab, and then write an APEX script to bring it to the other tab.  Can anyone confirm this, and guide me in the right direction?

Pradeep_NavatarPradeep_Navatar

It seems to be a right approach. You need to create a trigger on insert and update, which will copy the fields to the custom lead object.