I am implementing Salesforce MetadataAPI , i created the custom fields using Metadata API but those fields are not visible , so how to set fieldlevel visibilty to all custom fields using Metadata API

  • field visibility is defined on Profile, Permission Sets level. SO you have update it via metadata api accordingly on profile or permission set level Oct 23, 2019 at 9:54
  • @OleksandrBerehovskyi Thank You. it works fine but what about if i have multiple users, does it mean i have to update the permission of custom fields for all users. Oct 27, 2019 at 2:57

1 Answer 1


You need to set these permissions in the Profile object. They are called fieldPermissions, which states if each field is readable, editable, and the name of the field:


You may want to start by retrieving a Profile to see how this operates. The package.xml might look like:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

Make sure you include all standard objects in the CustomObject element that you wish to retrieve field permissions for.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .