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
Nik_PNik_P 

Looking for what the experts would do

Hello all,
 
Just a quick question for the experts out there.  We are looking to add multiple Web to Lead forms, which would have a lead source for a particular whitepaper download from the Internet.  The Web to Lead part works great, but we would like to automate the creation of a record in an object called Downloads, which would include the Lead ID, the name of the document (The lead source) and the Date (formulated to today).  Would the best way (in your opinion) to do this be:
  • develop some code which sits with the W2L form on the web, which would grab the Lead ID, then create the custom record
  • develop an Apex trigger that when a lead is created with a certain lead source type, that a record is created.
 
Thanks all,
 
Nik
werewolfwerewolf
The Apex trigger would definitely be the way to go.