sf project retrieve start --metadata 'CustomField:<namespace>__*' doesn't retrieve customfields from standard objects
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- cli
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện sf project retrieve start --metadata 'CustomField:<namespace>__*' và so sánh với dạng tường minh CustomField:<standardObjectName>.<namespace>__*. Đọc cách @salesforce/plugin-deploy-retrieve xử lý bộ chọn retrieve --metadata và đầu ra trường của standard-object. Hoàn tất khi việc chọn chỉ bằng namespace truy xuất các custom field phù hợp và tạo các thư mục object và field như mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Expected result
Custom fields with the specified namespace to be retrieved.
Relevant standard object and field directories to be created under the objects folder if they don't exist yet.
E.g:
"project/main/default/objects/Account/fields/mycustomfield__nsp__c.field-meta.xml"
Actual result
"Preparing retrieve request... done
Nothing retrieved"
Additional information
When I try to retrieve the customfields created on standard objects by a managed package, the command
sf project retrieve start --metadata 'CustomField:<namespace>__*'
returns
Nothing retrieved
It forces me to adjust the command to specify the standard object names in this way:
sf project retrieve start --metadata 'CustomField:<standardObjectName>.<namespace>__*'
E.g:
sf project retrieve start --metadata 'CustomField:Account.c2g__*'
That solution is not aligned with the general behaviour of the --metadata flag. The documentation doesn't mention it neither.
Since I'm building a process to retrieve those custom fields (among other metadata) from different org types, with different versions of the packages, I can't really know in advance all the standard objects with custom fields created by the managed package on them.
Running the retrieve command with all the possible standard objects names in the org is possible and works well according to our tests, but it takes around 10 minutes and is an unnecessary overload.
System Information
CLI:
@salesforce/cli/2.61.8 darwin-arm64 node-v21.6.2
Plugin Version:
@oclif/plugin-autocomplete 3.2.5 (core)
@oclif/plugin-commands 4.0.16 (core)
@oclif/plugin-help 6.2.13 (core)
@oclif/plugin-not-found 3.2.22 (core)
@oclif/plugin-plugins 5.4.10 (core)
@oclif/plugin-search 1.2.10 (core)
@oclif/plugin-update 4.5.10 (core)
@oclif/plugin-version 2.2.14 (core)
@oclif/plugin-warn-if-update-available 3.1.18 (core)
@oclif/plugin-which 3.2.15 (core)
@salesforce/cli 2.61.8 (core)
apex 3.5.0 (core)
api 1.2.2 (core)
auth 3.6.65 (core)
data 3.6.8 (core)
deploy-retrieve 3.12.15 (core)
info 3.4.9 (core)
limits 3.3.32 (core)
marketplace 1.2.26 (core)
org 4.6.0 (core)
packaging 2.8.10 (core)
schema 3.3.34 (core)
settings 2.3.23 (core)
sobject 1.4.40 (core)
source 3.5.21 (core)
telemetry 3.6.15 (core)
templates 56.3.21 (core)
trust 3.7.32 (core)
user 3.5.32 (core)
SF ENV. VARS.
SF_AUTOUPDATE_DISABLE,true
SF_DISABLE_AUTOUPDATE,true
SF_UPDATE_INSTRUCTIONS,Use "npm update --global @salesforce/cli" to update npm-based installations.
Windows: false
Shell: zsh
Channel: stable
Diagnostics
✅ pass - salesforcedx plugin isn’t installed
✅ pass - you don't have any linked plugins
✅ pass - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://artifactory.dev.financialforce.com/artifactory/api/npm/ffdc-npm
✅ pass - using latest or latest-rc CLI version
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://appexchange.salesforce.com/services/data
❌ fail - [@salesforce/plugin-auth] CLI supports v2 crypto
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 571
- Fork
- 80
- Merge trung bình
- 1 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của forcedotcom/cli
-
sf agent mcp asset replace --assets null throws raw TypeError instead of InvalidShapeCó thể đã có người làm @konkonrong-lgtm đã nhận 68 ngày trước. Đang mởarea:afdx bug investigating owned by another team validated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
forcedotcom/cli#3625 · 4 bình luận ·
-
area:afdx bug owned by another team
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
forcedotcom/cli#3608 · 2 bình luận ·
-
[BUG]: sf package version create always warns about org-capitalize-record-types, even when it's setĐang mởarea:packaging more information required owned by another team regression stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
forcedotcom/cli#3663 · 5 bình luận ·
-
[BUG]: NavigationMenu SourceMember name mismatch prevents source-tracked retrieve from completingĐang mởbug investigating validated
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
forcedotcom/cli#3660 · 3 bình luận ·
-
announcement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
forcedotcom/cli#3658 · 1 reaction ·
Tất cả issue của forcedotcom/cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CachyOS/cachyos-hooks#23 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
omnigent-ai/omnigent#10876 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Missing or invalid input directories are treated as successful empty batchesCó thể đã có người làm @IlyaKhalafi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
adbar/trafilatura#989 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
`--check` raises KeyError: 'file' for update_media / update_media_by_node CSVs with no `file` columnĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
mjordan/islandora_workbench#1147 ·
-
area/cli good first issue size/S type/feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
lorica-labs/volant#549 ·
Maintainer thường phản hồi trong vòng 1 ngày