feat: expand required-field FLS detection in generating-permission-set#271
Open
brianevanmiller wants to merge 1 commit into
Open
feat: expand required-field FLS detection in generating-permission-set#271brianevanmiller wants to merge 1 commit into
brianevanmiller wants to merge 1 commit into
Conversation
|
Thanks for the contribution! Before we can merge this, we need @brianevanmiller to sign the Salesforce Inc. Contributor License Agreement. |
Author
I signed it, thank you! |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

References: Contributing guide · Skill authoring guide · Agent Skills spec
What changed
skills/generating-permission-set/SKILL.md, covering Master-Detail relationships, system-required standard fields (Name,OwnerId,CreatedById), and required Lookups — beyond the existing<required>true</required>check.*.field-meta.xmlbefore emitting a<fieldPermissions>entry; if the file can't be read, flag for manual review rather than guessing.Why
The skill already forbids
<fieldPermissions>entries on required fields, but the guidance reads as a single check against<required>true</required>in field metadata. In practice, three other patterns produce the same deployment failure and are under-covered:Name,OwnerId) and required Lookups also fail FLS deployment.You can't edit field-level security for a required field, universally required field, or master-detail relationship field...) but isn't quoted in the skill, so an agent retrying a failed deploy can't match the error back to the rule.Real-world trigger: a custom datetime field was flipped to
<required>true</required>to back an LWC requirement; the existing permission set's<fieldPermissions>entry silently broke the next deploy with the error above. The updated guidance directs the agent to read the field metadata before emitting an entry, which catches this and similar cases.Notes
skills/generating-permission-set/SKILL.md(+15 / -2). No frontmatter changes.npm run validate:skillspasses locally (57/57). The three pre-existing line-count warnings on unrelated skills (developing-agentforce,generating-flexipage,using-ui-bundle-salesforce-data) are unchanged.Skills
Manual checklist
Description quality
Instructions
Context efficiency
templates/,examples/, ordocs/subdirectories