Can I set Field Level Security for Standard fields using the Metadata API via Eclipse?
To my knowledge this is not possible, but there are some smart cookies on here who may have a solution or alternative.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
For some standard fields, you can't change their permissions. Name is a common example for most objects, as are fields that are tied to standard functionality, like Opportunity Close Date. All other fields that you can modify through the UI can also be set through the metadata API. You just need to create a Profile container (e.g. a file in the file-based API), then specify a field level security element that includes the correct values for read, edit, and name.
I would recommend to go through below GitHub Repo by Andrew Fawcett
He has created a wrapper around Metadata API's and you can easily invoke them using Apex.
Hope this helps :)