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
jpollackjpollack 

Is there any way to make a standard field optional?

Hello all,

 

So, I'm converting an app from web-to-lead to the REST API.  It looks like we used to be able to leave out some fields (like Last Name) and still successfully create a new lead.  However, when I try to create a new lead through the REST interface without specifying Last Name, I get an HTTP 400 error.  Is there any way to make Last Name an optional field?

dkadordkador

No.  You could write an apex trigger that defaults the value to something, though.