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
satish waghsatish wagh 

Hide Mandatory Field in Salesforce Lightning

Can we hide the field that is created at the time  of custom object creation
Best Answer chosen by satish wagh
Khan AnasKhan Anas (Salesforce Developers) 
Hi Satish,

Greetings to you!

You can't remove the Required field but you can hide that.
1) Change the field type from Name to Auto Number.
2) Now in the Page layout remove that name field.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Satish,

Greetings to you!

You can't remove the Required field but you can hide that.
1) Change the field type from Name to Auto Number.
2) Now in the Page layout remove that name field.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
This was selected as the best answer
satish waghsatish wagh
Thanks Khan Anas!
satish waghsatish wagh
Hi Khan Anas,
Thanks For Valuable Response! I change the field type Text to Auto Number..But when i created record it takes the record as 1,2,3 ans so on..what shouls i do?
Jean BejarJean Bejar
Hey Khan,

I would just like to confirm that this would also work on the a required field but it's a picklist data type?