sfdx-plugin-source-read
sfdx/sf plugin to read Metadata via CRUD Metadata API
For certain Metadata Types there is a different behaviour of the file-based vs. CRUD-based Metadata API.
This plugin provides the sf force source read
command to read Metadata using the "CRUD-based" Metadata API
similar to sf force source retrieve
(which uses the "file-based" Metadata API).
Example
- When retrieving a
Profile
usingsf force source retrieve
it only contains<userPermissions>
. - When retrieving a
Profile
usingsf force source read
it contains all fields like<fieldPermissions>
,<tabVisibilities>
and more.
Installation
sf plugins install sfdx-plugin-source-read
Usage
sf force source read -m "Profile:Admin"
sf force source read -p force-app/main/default/profiles/Admin.profile-meta.xml
sf force source read -m "RecordType:Account.Business"
sf force source read -p force-app/main/default/objects/Account/recordTypes/Business.recordType-meta.xml
Disclaimer
Currently this has been tested only for Profiles
and RecordTypes
.