Platform Permission Set Generate

作者 forcedotcom3c15867bdb9d无许可证1K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Generates correct, deployable Salesforce permission set metadata (PermissionSet XML) with object, field, user, and app permissions. Use this skill when creating or editing permission set metadata, object permissions, field-level security (FLS), tab visibility, or deploying permission sets.

AI 生成的概览

生成 Salesforce 权限集元数据 XML,涵盖对象、字段、用户、应用和代理权限。

功能
该技能逐步指导构建可部署的 Salesforce PermissionSet 元数据 XML。内容涵盖核心属性、对象 CRUD 权限、字段级安全性、用户权限、应用与选项卡可见性、Apex 和 Visualforce 访问、许可证与记录类型设置,以及 Agentforce 代理访问。它还提供验证清单并列出常见的部署失败原因,最后说明通过 Salesforce CLI 进行部署。
适用场景
适用于创建或编辑权限集元数据,或在 Salesforce 中授予对象、字段、用户和应用权限时。也适用于设置字段级安全性、选项卡可见性,或准备部署权限集。
运行要求
不包含脚本,仅为说明性内容。生成和部署元数据需要 Salesforce 环境和 Salesforce CLI,代理访问条目必须与现有的 Agentforce Employee Agent 开发者名称匹配。

When to Use This Skill

Use when generating or editing permission set metadata, or when granting object, field, user, and app permissions.

Step 1: Define Core Properties

Start by defining the required permission set properties:

xml
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">    <fullName>YourPermissionSetName</fullName>    <label>Display Name for Administrators</label>    <description>Clear description of purpose and intended audience</description></PermissionSet>

Naming conventions:

  • Use descriptive API names (e.g., Sales_Manager_Access)

Step 2: Configure Object Permissions

Add CRUD permissions for standard and custom objects:

xml
<objectPermissions>    <allowCreate>true</allowCreate>    <allowRead>true</allowRead>    <allowEdit>true</allowEdit>    <allowDelete>false</allowDelete>    <modifyAllRecords>false</modifyAllRecords>    <viewAllRecords>false</viewAllRecords>    <viewAllFields>false</viewAllFields>    <object>Account</object></objectPermissions>

Step 3: Set Field-Level Security

Define field permissions for sensitive or custom fields:

xml
<fieldPermissions>    <editable>true</editable>    <readable>true</readable>    <field>Account.SSN__c</field></fieldPermissions>

Important:

  • Required fields must NEVER appear in list of field permissions. Granting field-level security on required fields is not allowed by the platform and will cause deployment failure.
  • Before adding any field, confirm from the object metadata that the field exists and is not required
  • A field is required when its metadata contains <required>true</required>:
  • Formula fields cannot be editable
  • Master-detail fields are required fields on the child (detail) object
xml
<fields>    <fullName>FieldName__c</fullName>    <required>true</required></fields>
  • Use format ObjectName.FieldName for field references
  • Set both readable and editable to true when the user needs edit access; editable implies readable
  • If all fields should be visible, can alternatively enable the "viewAllFields" object permission

Step 4: Grant User Permissions

Add system-level permissions for features and capabilities:

xml
<userPermissions>    <enabled>true</enabled>    <name>ApiEnabled</name></userPermissions><userPermissions>    <enabled>true</enabled>    <name>RunReports</name></userPermissions>

Common permissions:

  • ApiEnabled: API access
  • ViewSetup: View Setup menu
  • ManageUsers: User management
  • RunReports: Report execution

Security review required for:

  • ViewAllData: Read all records
  • ModifyAllData: Edit all records
  • ManageUsers: User administration

Step 5: Configure App and Tab Visibility

Make applications and tabs visible to users:

xml
<applicationVisibilities>    <application>Sales_Console</application>    <visible>true</visible></applicationVisibilities><tabSettings>    <tab>CustomTab__c</tab>    <visibility>Visible</visibility></tabSettings>

Application visibility options:

  • <visible> can be true or false

Tab visibility options:

  • Visible: The tab is available on the All Tabs page and appears in the visible tabs for its associated app. Can be customized.
  • Available: The tab is available on the All Tabs page. Individual users can customize their display to make the tab visible in any app
  • None: Not visible

CRITICAL - Tab Naming:

  • Custom object tabs: MUST include the __c suffix (e.g., MyCustomObject__c)
  • Standard object tabs: Use the object name with "standard-" prefix (e.g., standard-Account, standard-Contact)
  • The tab name matches the object's API name exactly

Step 6: Add Apex and Visualforce Access (Optional)

Grant access to custom code:

xml
<classAccesses>    <apexClass>CustomController</apexClass>    <enabled>true</enabled></classAccesses><pageAccesses>    <apexPage>CustomPage</apexPage>    <enabled>true</enabled></pageAccesses>

Step 7: Set License and Record Type Settings (Optional)

Specify license requirements and record type visibility:

xml
<license>Salesforce</license><hasActivationRequired>false</hasActivationRequired><recordTypeVisibilities>    <recordType>Account.Business</recordType>    <visible>true</visible>    <default>true</default></recordTypeVisibilities>

Step 8: Set Agent Access (Optional)

Enable access to Agentforce Employee Agents for users assigned to this permission set:

<agentAccesses>

<agentName>Sales_Assistant_Agent</agentName><enabled>true</enabled>

</agentAccesses>

Field requirements:

  • agentName (Required): The developer name of the employee agent
  • enabled (Required): Set to true to grant access, false to deny

Important:

  • Agent names must match existing Agentforce Employee Agent developer names

Validation Checklist

Before deploying, verify:

  • fullName, label, description set
  • Permissions follow least privilege
  • No required fields in <fieldPermissions>
  • No duplicate permissions
  • No lengthy comments

What Causes Deployment Failure

  • Field permissions on required fields: Any required field in <fieldPermissions> fails deployment. Required fields cannot have FLS; omit them entirely. Always confirm from object/field metadata that a field exists and is not required—never assume.
  • Incorrect API names: Using the wrong name or missing suffixes (e.g. missing __c for custom objects, fields, tabs) cause failure.

Deployment

Deploy using Salesforce CLI

来源与署名

来源:forcedotcom/sf-skills位于plugins/builder/salesforce-development/skills/platform-permission-set-generate提交3c15867

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 forcedotcom/sf-skills 的技能

Service Itsm Teams Itservice Configure

forcedotcom

Configure the "Set Up Salesforce IT Service" checklist for Microsoft Teams Employee Service (ITSM) — the employee side, covering app enablement, marketplace install guidance, user access assignment, and Digital Experience Site selection. Use this for: 'turn on Salesforce IT Service', 'set up IT Service on Teams', 'assign Teams for Employee permission set', 'give employees access to Teams for Employee Service', 'manage user access for Teams ITSM', 'grant users the permission sets needed for Teams Employee Service', 'select a digital experience site for Teams', 'install Salesforce IT Service app on Teams', or any request to complete the IT Service half of the Teams ITSM Go page checklist (including the Manage User Access step). DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Desk/fulfiller half of the checklist (service-itsm-teams-itdesk-configure).

待分类1K昨天更新

Service Itsm Teams Coordinate

forcedotcom

End-to-end autopilot orchestrator for setting up Microsoft Teams integration in Salesforce Service Cloud ITSM — runs the whole flow (enable the Teams for Employee Service Go feature, register the Microsoft Entra app, populate Named Credentials, configure the IT Desk and IT Service checklists, turn on Swarming, and optionally embed the Agentforce agent) in one continuous pass, stopping only at the points a human must act. Use when the user asks to set up Microsoft Teams for ITSM end to end, 'set up teams for it service', 'do the whole teams itsm setup', 'configure microsoft teams for employee service', or wants a guided Teams ITSM walkthrough. Delegates each stage to a specialized child skill while driving the sequence itself. DO NOT TRIGGER when the user asks to enable Teams alone, configure just the IT Desk or IT Service checklist alone, or enable Swarming alone — delegate directly to the specific child skill in those cases.

待分类1K昨天更新

Service Itsm Teams Itdesk Configure

forcedotcom

Configure the "Set Up Salesforce IT Desk" checklist for Microsoft Teams Employee Service (ITSM) — the fulfiller/agent side, covering app enablement, marketplace install guidance, user access assignment, and Swarming collaboration-tool setup. Use this for: 'turn on Salesforce IT Desk', 'set up IT Desk on Teams', 'assign Teams for IT Desk permission set', 'set Teams as collaboration tool for swarming', 'install Salesforce IT Desk app on Teams', or any request to complete the IT Desk half of the Teams ITSM Go page checklist. DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Service/employee half of the checklist (service-itsm-teams-itservice-configure).

待分类1K昨天更新

Service Itsm Teams Debug

forcedotcom

通过针对 Salesforce 组织运行通过/失败配置检查清单,诊断 Microsoft Teams 员工服务(ITSM)配置故障。

DevOps & Cloud1K昨天更新

Service Itsm Teams Employee Agent Configure

forcedotcom

Configure the embedded Agentforce Employee Agent so it replies inside the Microsoft Teams ITSM custom client ('Salesforce Employee Assist' / 'Ask AI Agent'). Use this for: 'set up employee agent in Teams', 'embed Agentforce agent in Teams', 'make the IT Service Employee Agent reply in Teams', 'Teams Ask AI Agent not responding', 'agent joins then leaves without replying', 'configure MIAW deployment for Teams employee agent', 'Teams embedded messaging agent setup'. Builds the whole stack headlessly (zero Setup-UI clicks): the Web messaging channel with User Verification ON, the Enhanced Chat User Verification Key Set (JWKS_URL) it requires, the Teams_AgentForce custom-client deployment, the routing flow to the agent, and the Agent Access permission set that lets the portal user reach the agent. DO NOT TRIGGER for enabling the Teams feature Salesforce Go page toggle (service-itsm-teams-configure) or for configuring notification preferences.

待分类1K昨天更新

Service Itsm Swarming Configure

forcedotcom

通过 Connect API 调用启用 Salesforce Swarming ITSM 功能,并将协作工具设为 Teams。

DevOps & Cloud1K昨天更新