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
Rakesh ERakesh E 

Required field is missing error.

Hi ,

 

i have a custom object in which i have made the standard name field as "Auto Number". but when i am trying to insert a record through Apex its giving me an error saying that the required field Name is missing.

  

  • Request  Number: Required fields are missing: [Name]
  • Error Occured - Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Name]: [Name]

i have created a managed package in this org , which added a namespace to every API name (however standard fields dont have namespace pre-pended to them)

 

 

please let me know what could be the problem. to my surprise the same is working correctly in another org. that only difference is that in the other org there is no namespace defined. is the namespace creating problem

 

thanks in advance 

 

Regards,

Rakesh

 

 

 

ManjunathManjunath

Hi,

 

It would be good to understand if you can give sample code.

 

Regards,

 

dphilldphill

Do you have the Name under an <apex:inputField tag somewhere?  It could be standard page validation causing this error and not apex... seeing your code would help.