You need to sign in to do that
Don't have an account?
Insert data fail when Standard field “Name” is “Auto Number” type.
Hi,
I use rest api to do the CRUD with Salesforce data.
But when I do the insert data I met a problem.
My object's Standard Field Name "Name" 's Data Type is "Auto Number". So I set a value like my auto-number style like "A0002", then I call the endpoint. But I see the following error:
Fail to create record on TestPackage11__TestWen__c. Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile or permission set.
Then I change this Data Type as a "Text", the create operate can work successful.
So does anyone know how to insert a data when the object's name fields is the auto-number type?
Thank you!
You're still passing name, remove name entirly from the request.
All Answers
If name is auto number , the field will get auto populated on inesert. Dont set any value for name. It will work.
Hi,
Thanks for your answer.
I removed the value and try the insert again. But still see that error.
Have a look with my code. I use Salesforce Integration Components in my Java project.(http://hst-salesforce.forge.onehippo.org/gettingstarted.html)
You're still passing name, remove name entirly from the request.
Hi,
I remove the name, it works well.
Thank you!