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 – Oleksandr Berehovskyi Oct 23 '19 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. – Shahid bhat Oct 27 '19 at 2:57

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.