You need to sign in to do that
Don't have an account?

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(
{
'Name':member_name,
'LastName':member_name,
'Email': email,
'Phone': phone
})
print(data_obj)
Please find the attachemnt for error info.
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.
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_lead.htm
If this helps, Please mark it as best answer.
Thanks!!