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

Is it possible for lead guestuser to submit attachments

I have created a site, referenced a visualforce page which is a form and hosted it in an ifrane on the company's website. The form when completed and submitted, creates a lead in Salesforce, and the form is renderedAs a  pdf, and attachment laso gets inserted in salesforce, and related to the lead.  So far so good.  

Here's another use case i am trying to solve - 

There are certain types of leads that are created manually. 
After the lead is created, we email out the form link to the lead. 

How can i ensure that when the lead submits the form, it finds the already created lead record in salesforce, and does not create a duplicate. 


When the lead submits this form, how can the form which is renderedAs pdf be attached to the already created lead. ? 
ShirishaShirisha (Salesforce Developers) 


You would need to first find out the duplicate lead record and then update the existing lead record using trigger.

Please find the sample code in the below thread:

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Shirisha Pathuri