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
Ben PerkinsBen Perkins 

Please Help Error: Invalid Data.

I keep getting the below error message when I try to create a new lead

Please help?

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger MergeLeadOnCreatingWebtoLead caused an unexpected exception, contact your administrator: MergeLeadOnCreatingWebtoLead: execution of AfterInsert caused by: System.QueryException: No such column 'Address' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.: Trigger.MergeLeadOnCreatingWebtoLead: line 45, column 1
bob_buzzardbob_buzzard
Address is a compound field for API access:

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/compound_fields_address.htm

Instead, you would populate the component fields e.g. Street, State, City.
Deepthi BDeepthi B

Hello Ben,
You can set the individual fields, such as BillingStreet, BillingCity, BillingState, BillingPostalCode, and BillingCountry (plus the geolocation codes, as well, if you prefer). The address complex field is a convenience field derived from the parts, just as a contact or lead's "Name" field is really a concatenation of the various parts of their name (first, last, etc).

Regards,
Deepthi