本文へ移動
cccskills
無料GitHub で公開

global-actions-and-quick-actions

Use this skill when configuring object-specific quick actions or global actions in Salesforce: choosing between action types, editing action layouts, pre-filling fields with predefined values, and adding actions to Lightning page layouts or mobile navigation. Trigger keywords: quick action, global action, action layout, pre-fill fields, predefined values, Salesforce mobile actions. NOT for building an LWC that runs as a quick action — use lwc/lwc-quick-actions. NOT for converting Classic JavaScript or URL buttons — use admin/custom-button-to-action-migration. NOT for Dynamic Actions visibility rules on a Lightning record page — use admin/dynamic-forms-and-actions. Also covers the QuickAction metadata type: quickAction-meta.xml, quickActionLayout, fieldOverrides, targetObject, targetParentField, targetRecordType, flowDefinition, and the Layout platformActionList and quickActionList entries that place an action.

インストール方法を見る

含まれるファイル(8)

  • SKILL.md22.9 KB
  • references/examples.md7.6 KB
  • references/gotchas.md12.4 KB
  • references/llm-anti-patterns.md7.3 KB
  • references/metadata-examples.md21.6 KB
  • references/well-architected.md7.7 KB
  • scripts/check_global_actions_and_quick_actions.py16.2 KB
  • templates/global-actions-and-quick-actions-template.md2.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Global Actions and Quick Actions

This skill activates when an admin needs to create, configure, or troubleshoot global or object-specific quick actions — including editing action layouts, setting predefined field values, and surfacing actions in Lightning Experience or the Salesforce mobile app.


Before Starting

Gather this context before working on quick actions:

  • Where should the action appear? Global actions appear in the global header and home page; object-specific actions appear on a specific object's record page. The object determines where Setup → Object Manager → Actions is found.
  • What should the action do? Choose the correct action type before creating (see Core Concepts below). The type cannot be changed after creation.
  • Who needs to see the action? Actions are added to page layouts. Multiple profiles using different page layouts may need separate layout updates.
  • Mobile or desktop or both? The "Salesforce Mobile and Lightning Experience Actions" section of a page layout controls both. If you want desktop-only, there is no built-in filter — the same actions list applies to both surfaces.

Questions to Ask Before Configuring

Ask these before opening Setup. Each one maps to a gotcha in references/gotchas.md; skipping them produces an action that deploys cleanly and does the wrong thing.

AskWhy it mattersWhat a good answer adds
"Which record is the user looking at when they press this?"A named record means object-specific and targetParentField can link the new record; "any page" means global and the user must pick the parent by handThe scope decision, and whether parent linkage is free or manual
"Which fields must the user type, and which should we set for them?"Typed fields go on the action layout; set fields become fieldOverrides and can be omitted from the layout entirelyThe split between layout items and predefined values
"Is each pre-set field a picklist?"literalValue is picklists only; every other type needs formula with a quoted string (gotcha 7)The correct override element per field, before the deploy fails
"Do any of these fields already have a default value?"A predefined value overrides the field default, so the action's records diverge from every other creation path (gotcha 8)A conscious decision instead of a later data-quality investigation
"Which page layouts, and which surfaces — record bar, Classic publisher, mobile, list view?"platformActionList and quickActionList are separate lists, and actionListContext picks the bar (gotcha 11)The exact Layout edits, deployable in the same change
"Is this object already on Dynamic Actions?"If yes, the FlexiPage action list drives the bar and Layout edits are dead configurationA redirect to admin/dynamic-forms-and-actions before wasted work
"How many actions are already in front of this one?"Position decides discoverability; sortOrder is the only lever (gotcha 5)An agreed sortOrder, and which existing action loses its slot

What a proper configuration adds over just creating the action: the record it creates is linked and pre-filled without user typing, the pre-set values are written with the element the field type actually accepts, and the action ships in the same deployment as every Layout that surfaces it — so it is visible to real users on the first release rather than the second.


Core Concepts

Action Types

These are the six action types an admin picks in Setup day to day. Choosing the wrong one at creation forces deletion and recreation. The full QuickActionType enum in the Metadata API also carries Post, SocialPost and Canvas — see the metadata table below:

Action TypeCreates a new recordUpdates current recordLogs activityLaunches UI
CreateYesNoNoNo
UpdateNoYesNoNo
Log a CallNoNoYesNo
Custom (VF / LWC)ConfigurableConfigurableNoYes
FlowConfigurableConfigurableNoYes
Send EmailNoNoNoYes

Create actions are the most common. They create a child or related record (e.g., create a Contact from an Account). When object-specific, the parent record is automatically linked. When global, no parent context is available.

Update actions modify fields on the current record without opening the full edit page. Useful for quick status changes or stage updates.

Log a Call actions create a completed Task record with subject, description, and date fields. Available on objects that support Activity tracking.

Flow actions launch a screen-flow UI within the action dialog. The flow receives the record ID as an input variable if the action is object-specific.

Global Actions vs Object-Specific Actions

Global ActionsObject-Specific Actions
Setup locationSetup → Global ActionsSetup → Object Manager → [Object] → Buttons, Links, and Actions
Parent record contextNot availableAvailable via merge fields and predefined values
Where they appearGlobal header, Home page, ChatterRecord pages only
Page layout ownershipGlobal Publisher LayoutsObject's page layout
Mobile availabilityYes, via global headerYes, via record page

The key behavioral difference: object-specific actions can reference the source record's fields in predefined values (e.g., pre-fill Account Name on a new Contact from an Account record). Global actions cannot because there is no guaranteed source record.

Action Layouts

Every quick action has its own action layout — a separate, independent layout that controls which fields appear inside the quick action dialog. This is distinct from the page layout, which controls field visibility on the record detail page.

Key points:

  • Adding a field to a page layout does not make it appear in a quick action. Fields must be added to the action layout separately.
  • Action layouts are edited in Setup: navigate to the action, then click Edit Layout on the action detail page.
  • Action layouts are compact by design — best practice is 4–8 fields maximum. More fields defeats the purpose of a quick action.
  • Required fields must appear on the action layout or Salesforce will prevent saving.
  • Formula fields, roll-up summary fields, and auto-number fields cannot be added to action layouts. (UNVERIFIED 2026-09-04: not stated in the Metadata API guide's QuickActionLayout section; confirm in Setup before relying on it.)

Predefined Values (Pre-filling Fields)

Predefined values let you auto-populate action layout fields so users do not have to enter them manually. This is configured per-action under Predefined Field Values.

Behavior:

  • Predefined values support literal values and merge field formulas that reference the source record.
  • For object-specific actions, {!ObjectName.FieldAPIName} syntax resolves at runtime to the parent record's field value.
  • For global actions, only static literal values are supported — no source-record merge fields.
  • Pre-filled values are editable by the user at action time unless the field is removed from the action layout (hidden but still set).
  • A field can receive a predefined value without appearing on the action layout. This is intentional: the field is set silently in the background.

Example predefined value formula on a Contact quick action on Account:

Account Name: {!Account.Name}
Record Type: Customer Contact

Adding Actions to Page Layouts

An action is not visible to users until it is added to a page layout. Two sections of the page layout editor are relevant:

  1. Salesforce Classic Publisher — Legacy section. Avoid for new work.
  2. Salesforce Mobile and Lightning Experience Actions — The correct section for all Lightning and mobile configurations. Actions dragged here appear in both Lightning Experience and the mobile app.

For global actions, they go into the Global Publisher Layout (Setup → Global Publisher Layouts), not an object's page layout.

Steps to add an object-specific quick action to a Lightning record page:

  1. Open Setup → Object Manager → [Object] → Page Layouts → [Layout Name].
  2. Drag Mobile & Lightning Actions palette items into the "Salesforce Mobile and Lightning Experience Actions" section.
  3. Save the page layout.
  4. If the layout already has actions, confirm the action is not buried behind the "More" overflow — the first 5 actions in this section appear directly on the highlights panel; subsequent actions go under a "More" dropdown.

The Metadata Behind the Setup Screens

Every Setup field maps to one element of the QuickAction metadata type. Read this table when reviewing a diff or writing the XML by hand; references/metadata-examples.md has the full deployable files.

Setup controlElementNotes from the Metadata API guide
Action TypetypeRequired. Canvas, Create, Flow, LightningComponent, LogACall, Post, SendEmail, SocialPost, Update, VisualforcePage
Target ObjecttargetObject"The object for which the action is created and performed"
(implicit parent link)targetParentField"Links the target object to the parent object" — object-specific actions only
Record TypetargetRecordTypeOnly Business Account, Person Account, Master — see gotcha 6
Label / Standard Labellabel / standardLabelstandardLabel uses the QuickActionLabel enum so the platform supplies a translated label
Create a feed itemoptionsCreateFeedItemRequired; applies only to Create, Update and Log a Call
Success MessagesuccessMessageAPI 36.0+
Edit LayoutquickActionLayoutlayoutSectionStyle (required) + quickActionLayoutColumns → quickActionLayoutItems (field, emptySpace, uiBehavior)
Predefined Field ValuesfieldOverridesfield + formula or literalValue
FlowflowDefinitionAPI name of the flow
Lightning / Visualforce / CanvaslightningComponent / page / canvasplus height and width in pixels

Files live in quickActions/, suffix .quickAction. Object-specific actions are addressed with dot notation — the platform uses Account.QuickCreateContact for an entity-level action and Global.CreateNewContact for a global one, per the Apex describeQuickActions signature.

The action's placement is not part of the action. It lives on the Layout (platformActionList for the Lightning and mobile bar, quickActionList for the Classic publisher) or, when Dynamic Actions are on, on the FlexiPage.


Common Patterns

Pattern 1: Create-Child Quick Action with Pre-filled Parent Lookup

When to use: You need users to quickly create a related record (e.g., new Opportunity from an Account) without navigating away.

How it works:

  1. In Object Manager → Account → Buttons, Links, and Actions → New Action.
  2. Action Type: Create. Target Object: Opportunity. Label: "New Opportunity".
  3. In the action layout, add fields: Opportunity Name, Close Date, Stage. Remove all other fields.
  4. Under Predefined Field Values, set Account Name to {!Account.Name}.
  5. Add the action to the Account's "Salesforce Mobile and Lightning Experience Actions" section in the page layout.

Why not a manual navigate: Users stay in context. The Opportunity is already linked to the Account via the predefined account lookup.

Pattern 2: Update Action for Quick Status Change

When to use: A field (like Case Status or Lead Status) needs to be changed without opening the full record edit.

How it works:

  1. Object Manager → [Object] → New Action. Action Type: Update.
  2. Add only the status field to the action layout.
  3. Add a predefined value for the new status if it should always be a specific value (e.g., "Closed").
  4. Add to page layout.

Why not inline edit: Inline edit on a record detail page requires the field to be on the page layout and the user to click the field. A quick action is discoverable as a button and works well for mobile.

Pattern 3: Global Quick Action for Object-Agnostic Record Creation

When to use: Users need to log a Call or create a Task from any page (home, Chatter feed, report) without being on a specific record.

How it works:

  1. Setup → Global Actions → New Action. Action Type: Log a Call.
  2. Add fields: Subject, Description, Date.
  3. The action appears in the global header (bell/quick action icon in Lightning).
  4. Users can manually relate the log to a record after creation via the "What" and "Who" fields.

Why not object-specific: The user may not be on the record when they need to log. Global actions are accessible from anywhere.


Decision Guidance

SituationRecommended ApproachReason
Action must pre-fill from the current record's fieldsObject-specific action + predefined valuesGlobal actions have no source-record context
Action should be accessible from any Salesforce pageGlobal action + Global Publisher LayoutObject-specific actions only appear on their object's record pages
Action launches a FlowObject-specific Flow action (pass record ID)Flows that mutate the current record need the record ID as input
Action should only appear for one profile/roleUse page layout assignments to restrictActions are surfaced via page layouts; profile → layout assignment controls visibility
Action should create a related child recordCreate action on the parent objectPre-fill the parent lookup using predefined values with merge fields
You need to update a single field quicklyUpdate actionNarrower UX than full edit; works well on mobile

Recommended Workflow

  1. Scope and surface — answer the Questions table above; decide object-specific vs global, and list every page layout (or FlexiPage) that must carry the action. If the object is on Dynamic Actions, stop and route to admin/dynamic-forms-and-actions
  2. Split the fields — put user-typed fields in quickActionLayout with the right uiBehavior, and everything you set for the user in fieldOverrides; check each override's field type against literalValue (picklists only) vs formula
  3. Write or configure the action — copy the matching shape from references/metadata-examples.md (Create with parent link, global Log a Call, Update, Flow, custom component, Person Account), or build it in Setup and retrieve it
  4. Place it — add the action to platformActionList with an explicit sortOrder, and to quickActionList too if Classic is still in use; keep the action and its layouts in one deployment
  5. Check statically — run python3 scripts/check_global_actions_and_quick_actions.py --manifest-dir force-app/main/default and clear every ERROR; treat unplaced INFOs as release blockers unless the action is deliberately parked
  6. Verify as a user, not as an admin — run QuickAction.describeAvailableQuickActions('<Object>') and ('Global') in anonymous Apex as a test user on the target profile, then open a record and confirm the pre-filled values and the action's position in the bar
  7. Record it — fill in templates/global-actions-and-quick-actions-template.md with the layout placement, the overrides, and the profiles that can see it

Review Checklist

Before marking quick action configuration complete:

  • Action type is correct for the use case (cannot change after creation)
  • Action layout has only the fields needed — remove unnecessary fields
  • Required fields are on the action layout (absent required fields block saves)
  • Predefined values are set for parent record linkages and any constant defaults
  • Action has been added to the correct page layout section: "Salesforce Mobile and Lightning Experience Actions"
  • Page layout is assigned to the correct profiles
  • Action tested in both Lightning Experience (desktop) and mobile app if both are in use
  • For global actions: action appears in the Global Publisher Layout

Salesforce-Specific Gotchas

Non-obvious platform behaviors that cause real production problems:

  1. Action layout ≠ page layout — Adding a field to the object's page layout does not add it to the action's form. You must edit the action layout separately via the action's Edit Layout button. This trips up admins who expect one layout to control everything.

  2. LWC global quick actions are Field Service mobile only — According to the Lightning Web Components Developer Guide, LWC components exposed as lightning__GlobalAction targets are available only in the Field Service mobile app, not in standard Lightning Experience on desktop or mobile. Using a Visualforce or Aura component is the correct approach for global custom actions in regular Lightning Experience.

  3. Actions do not appear without a page layout assignment — Creating an action and editing its layout is not sufficient; the action must also be dragged into the page layout's actions section and the page layout must be assigned to the user's profile. If an action is missing for some users but visible to others, check page layout assignments.

  4. The first ~5 actions in the mobile/Lightning section display directly; the rest go to "More" (UNVERIFIED 2026-09-04: the count is not in the extracted guides; observed behaviour, not a documented limit) — Users often cannot find actions that are listed 6th or later. Keep the highest-frequency actions in the first five positions.

  5. Predefined values using merge fields only work for object-specific actions — If you attempt to use {!ObjectName.Field} syntax on a global action predefined value, Salesforce will throw a validation error at save time. Global action predefined values must be static literals or formulas without source-record references.


Output Artifacts

ArtifactDescription
Configured quick actionAction of the correct type, attached to the object or global context
Action layoutCompact form with only the necessary fields, required fields present
Predefined valuesPre-filled parent lookups and constant defaults reducing user effort
Page layout updateAction visible in the "Salesforce Mobile and Lightning Experience Actions" section

Reference Files

FileRead it when
references/metadata-examples.mdWriting or reviewing .quickAction-meta.xml, the Layout action lists, package.xml, or the deploy and verification commands
references/gotchas.mdAn action deployed but is invisible, a predefined value is ignored or rejected, or a record from the action differs from every other creation path
references/examples.mdYou want a worked end-to-end configuration (create-child, quick update, global log-a-call) with the Setup clicks spelled out
references/well-architected.mdDeciding global vs object-specific, declarative vs custom component, or how many actions a record page should carry
references/llm-anti-patterns.mdReviewing AI-generated quick action guidance before acting on it
templates/global-actions-and-quick-actions-template.mdDocumenting a finished action: type, layout fields, overrides, placement, profile access, test results
scripts/check_global_actions_and_quick_actions.pyStatic-checking retrieved metadata before a deploy

Related Skills

  • admin/app-and-tab-configuration — Lightning app configuration; action bar visibility is affected by the Lightning app's navigation items
  • flow/screen-flows — When the quick action type is "Flow", the referenced flow must be a screen flow; this skill covers building screen flows
  • admin/object-creation-and-design — Object and field design that determines what can be referenced in quick actions and predefined values
  • admin/dynamic-forms-and-actions — Dynamic Actions on a Lightning record page: this skill defines the actions, that skill controls when each one is visible
  • admin/record-types-and-page-layouts — The full Layout metadata shape and record-type-to-layout assignment; read it before hand-editing a layout file
  • admin/custom-button-to-action-migration — Replacing Classic JavaScript, URL, and list buttons with actions
  • admin/case-feed-send-email-action — The Case Feed Send Email action and its QuickActionDefaultsHandler, which is the supported way to shape an outbound email before it sends
  • lwc/lwc-quick-actions — Building the component behind a custom action: the required target, recordId, and closing the modal

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill when writing test-first, behavior-driven acceptance criteria in Given/When/Then format for a Salesforce user story. Covers happy path, edge cases, negative paths, permission boundaries, and data-state preconditions so the AC block can drive UAT scripts and Apex test design downstream. Trigger keywords: given when then, gherkin, behavior driven AC, test first acceptance criteria, scenario outline, BDD acceptance criteria. NOT for the user-story format itself (use admin/user-story-writing-for-salesforce). NOT for UAT script writing (use admin/uat-test-case-design). NOT for Apex test method generation (use agents/test-class-generator). NOT for high-level UAT planning (use admin/uat-and-acceptance-criteria). More triggers: acceptance criteria record, ac_id, req_id on a criterion, artefact under test, negative case for a rule-type requirement, no-match fall-through criterion, oracle for a Then clause, test type apex flow manual, criteria linter, check_ac_format.py, --manifest-dir.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Task and Event objects: polymorphic WhatId/WhoId, Activity object model, ActivityHistory vs OpenActivity, activity timeline customization, bulk task creation, Einstein Activity Capture boundaries. NOT for turning on EAC or calendar sync — use admin/einstein-activity-capture-setup. NOT for Email-to-Case — use admin/case-management-setup. Covers ActivitiesSettings metadata, enableActivities, shared Task/Event custom fields and FLS, TaskStatus value sets, Shared Activities and TaskRelation/EventRelation, recurring and child activities, and partial-success bulk DML on Task.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Design Invocable Apex actions that return deterministic, agent-friendly errors instead of surfacing raw exceptions to the LLM. NOT for authoring the action itself — @InvocableMethod schema, labels, security context — use agentforce/custom-agent-actions-apex. NOT for the Apex tests that force each error branch — use agentforce/agent-action-unit-tests.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Use when designing how an Agentforce agent extracts structured input parameters (slots) from a user's natural-language utterance to invoke an action. Triggers: 'agent extract date from user', 'agent action argument extraction', 'agentforce slot filling', 'agent invocable input mapping', 'agent fails to fill required parameter'. NOT for action authoring (use agentforce/agent-actions) or for prompt-template variable binding (use agentforce/prompt-builder-templates).

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Apex test patterns for @InvocableMethod agent actions: per-reason-code branch coverage, bulk safety, callout mocking, deterministic assertions. NOT for testing whether the agent routes to the right topic or answers well — use agentforce/agent-testing-and-evaluation. NOT for designing the error envelope the tests assert on — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Designing or reviewing Agentforce actions: Flow actions, Apex invocable actions, prompt-template actions, action naming, input and output contracts, confirmation requirements, and safe error behavior. Triggers: 'agent actions', 'build an agent that can look up an order', 'make the agent able to check order status', 'give the agent a capability', 'agent that can retrieve a record', 'flow action for agent', 'agent invocable action', 'action schema design'. NOT for writing the Apex class itself — use agentforce/custom-agent-actions-apex. NOT for the reason_code error envelope that stops an agent retry loop — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

PranavNagrecha のスキルをすべて見る

このスキルの問題を報告する