+ Start a Discussion

Unable to insert date to Name field of prospect object

Hi Team! Need Help.

 We are trying to integrate our javascript application with salesforce. During this we need to insert date into Name field of prospect object. We have modifily all permissions on the object, but still we are thrown with a security error.

This is the code we are using to integrate.

data_obj = client.sobjects.Lead.insert(

'Email': email,
'Phone': phone
User-added image
Please find the attachemnt for error info.

Best Answer chosen by Sandeepbv
AnkaiahAnkaiah (Salesforce Developers) 
Hi Sandeep,

In the lead object Name field is not writable. You can remove the Name field from your code. If you want you can pass the FirstName field instead of Name.

Name field is a concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.

Refer the below help article and check the properties of name field.

If this helps, Please mark it as best answer.