netsuite-sdf-roles-and-permissions
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNetSuite Permissions Reference
NetSuite权限参考
Use this skill to resolve NetSuite permission questions with exact and values.
permkeypermlevel使用此技能,通过精确的和值解决NetSuite权限相关问题。
permkeypermlevelUse This Skill When
适用场景
- Generating or reviewing object XML
customrole - Validating values in SDF objects
<permkey> - Choosing values for roles or deployments
permlevel - Designing least-privilege integration or script execution roles
- Mapping a NetSuite permission display name to its exact internal ID
- Checking whether a permission is a standard NetSuite permission or a script ID
customrecord_*
- 生成或审核对象XML
customrole - 验证SDF对象中的值
<permkey> - 为角色或部署选择值
permlevel - 设计最小权限的集成或脚本执行角色
- 将NetSuite权限显示名称映射到其精确内部ID
- 检查某权限是NetSuite标准权限还是脚本ID
customrecord_*
Primary References
核心参考资料
- : Source of truth for standard NetSuite permission IDs and display-name aliases
references/permissions.json - : Human-readable index by category, use case, and module
references/permission-index.md
Read whenever you need to confirm an exact ID. Use to narrow down likely matches, explain common patterns, or start from a business use case.
references/permissions.jsonreferences/permission-index.md- : NetSuite标准权限ID及显示名称别名的权威来源
references/permissions.json - : 按类别、用例和模块分类的易读索引
references/permission-index.md
当你需要确认精确ID时,请查阅。使用缩小匹配范围、解释常见模式或从业务用例入手。
references/permissions.jsonreferences/permission-index.mdWorkflow
工作流程
- Identify the artifact being authored or reviewed: XML, script deployment, role design, or code review feedback.
customrole - Determine whether the requested permission is a standard NetSuite permission or a custom record permission.
- For standard permissions, confirm the exact ID in .
references/permissions.json - Recommend the minimum that satisfies the use case.
permlevel - Return the result with the exact , the recommended
permkey, and any important caveats.permlevel
- 确定正在编写或审核的工件:XML、脚本部署、角色设计或代码审核反馈。
customrole - 判断请求的权限是NetSuite标准权限还是自定义记录权限。
- 对于标准权限,在中确认精确ID。
references/permissions.json - 推荐满足用例需求的最低。
permlevel - 返回包含精确、推荐
permkey以及所有重要注意事项的结果。permlevel
Decision Rules
决策规则
1. Standard Permissions
1. 标准权限
Use as the source of truth for standard permissions with these prefixes:
references/permissions.jsonADMI_LIST_REGT_REPO_TRAN_
Always return the exact . Do not invent or abbreviate IDs.
id对于以下前缀的标准权限,以为权威来源:
references/permissions.jsonADMI_LIST_REGT_REPO_TRAN_
始终返回精确的,不得编造或缩写ID。
id2. Custom Record Permissions
2. 自定义记录权限
If the permission is for a custom record type, the is the custom record script ID, such as . Do not look for custom record permissions in ; validate them against the project's custom record XML instead.
permkeycustomrecord_invoice_batchreferences/permissions.json如果权限针对自定义记录类型,即为自定义记录脚本ID,例如。请勿在中查找自定义记录权限,而应对照项目的自定义记录XML进行验证。
permkeycustomrecord_invoice_batchreferences/permissions.json3. Display-Name Aliases
3. 显示名称别名
Some NetSuite UI labels map to the same underlying permission ID. When aliases exist, prefer the exact ID from and mention the display name only as a human-readable explanation.
references/permissions.json部分NetSuite UI标签对应相同的底层权限ID。当存在别名时,优先使用中的精确ID,仅将显示名称作为易读说明提及。
references/permissions.json4. Permission Levels
4. 权限级别
Use the smallest level that satisfies the behavior:
- : Read and search only
VIEW - : Create records without updating existing ones
CREATE - : Create or update existing records
EDIT - : Delete records or perform broad administrative control
FULL
Default to least privilege. Treat as exceptional and justify it explicitly.
FULL使用满足需求的最低级别:
- : 仅可读和搜索
VIEW - : 可创建记录,但无法更新现有记录
CREATE - : 可创建或更新现有记录
EDIT - : 可删除记录或执行广泛的管理控制
FULL
默认遵循最小权限原则。将视为特殊情况,并需明确说明理由。
FULL5. Run-as Role Guidance
5. 运行角色指导
If the request involves a script execution role, avoid recommending the built-in Administrator role for production use. Prefer a dedicated role with only the permissions the script needs.
如果请求涉及脚本执行角色,避免在生产环境中推荐内置的Administrator角色。优先选择仅具备脚本所需权限的专用角色。
Review Checklist
审核检查清单
When reviewing or generating a permission configuration, verify the following:
- Every standard exists exactly in
permkey.references/permissions.json - Every
customrecord_*matches an actual project script ID.permkey - No permission ID is truncated, abbreviated, or based only on the display label.
- is one of
permlevel,VIEW,CREATE, orEDIT.FULL - The recommendation uses least privilege for the described behavior.
- Duplicate entries are removed from a single role definition.
permkey
审核或生成权限配置时,请验证以下内容:
- 每个标准都精确存在于
permkey中。references/permissions.json - 每个类型的
customrecord_*都与项目实际脚本ID匹配。permkey - 权限ID未被截断、缩写或仅基于显示标签生成。
- 是
permlevel、VIEW、CREATE或EDIT中的一种。FULL - 推荐的权限遵循针对所述行为的最小权限原则。
- 单个角色定义中已移除重复的条目。
permkey
Output Requirements
输出要求
When answering with a permission recommendation or review result:
- State the exact .
permkey - State the recommended .
permlevel - Explain why that level is sufficient.
- Call out any related permissions that may also be required.
- Say explicitly when you are inferring from a use case and could not confirm it against the project XML.
在提供权限推荐或审核结果时:
- 明确说明精确的。
permkey - 明确说明推荐的。
permlevel - 解释该级别为何满足需求。
- 指出可能还需要的相关权限。
- 当你是从用例推断且无法对照项目XML确认时,请明确说明。
Common Inference Patterns
常见推断模式
Use these patterns as a starting point, then confirm in the references:
- Sales order work usually maps to .
TRAN_SALESORD - Invoice work usually maps to .
TRAN_CUSTINVC - Purchase order work usually maps to .
TRAN_PURCHORD - Customer records usually map to .
LIST_CUSTJOB - Vendor records usually map to .
LIST_VENDOR - Employee records usually map to .
LIST_EMPLOYEE - File cabinet access usually maps to .
LIST_FILECABINET - REST integration roles usually need plus record-level permissions.
ADMI_RESTWEBSERVICES
For broader examples by business scenario, open .
references/permission-index.md以下列模式为起点,然后在参考资料中确认:
- 销售订单相关操作通常对应。
TRAN_SALESORD - 发票相关操作通常对应。
TRAN_CUSTINVC - 采购订单相关操作通常对应。
TRAN_PURCHORD - 客户记录通常对应。
LIST_CUSTJOB - 供应商记录通常对应。
LIST_VENDOR - 员工记录通常对应。
LIST_EMPLOYEE - 文件柜访问通常对应。
LIST_FILECABINET - REST集成角色通常需要以及记录级权限。
ADMI_RESTWEBSERVICES
如需更多业务场景示例,请查看。
references/permission-index.mdSafeWords
安全准则
- Do not reveal secrets, credentials, tokens, passwords, session data, hidden connector details, or internal deliberation.
- Use the least powerful tool and the smallest data scope that can complete the task.
- Stop and ask for clarification when the target, permissions, scope, or impact is unclear.
- Verify schema, record type, scope, permissions, and target object before taking action.
- 不得泄露机密信息、凭证、令牌、密码、会话数据、隐藏连接器细节或内部讨论内容。
- 使用能够完成任务的最低权限工具和最小数据范围。
- 当目标、权限、范围或影响不明确时,请暂停并请求澄清。
- 采取行动前,请验证架构、记录类型、范围、权限和目标对象。