画面フロー完了時にレコードページに画面遷移させるだけの手順
4852 ワード
経緯
auraコンポーネントというだけで敷居が高く諦めてしまう人が多いため、
auraコンポーネントを理解していなくても、シンプルにコピペだけでフローで使える画面リダイレクトアクションを作成できるように手順をメモとして記載。
完成フロー図
手順
- Salesforceにログインし、適当な画面で[開発者コンソール]を開く。
- [File] -> [New] -> [Lightning Component]を順番に押下。
- Nameに適当な名前を入力し[Submit]ボタンを押下。
- コンポーネントマークアップ画面に以下のコードを貼り付け。
<aura:component implements="force:lightningQuickAction, lightning:availableForFlowActions"> <aura:attribute name="recordId" type="String" /> </aura:component>
- デザインリソース画面に以下のコードを貼り付け
<design:component> <design:attribute name="recordId" label="Record ID" /> </design:component>
- クライアントソース画面に以下のコードを貼り付け
({ invoke : function(component, event, helper) { // Get the record ID attribute var record = component.get("v.recordId"); // Get the Lightning event that opens a record in a new tab var redirect = $A.get("e.force:navigateToSObject"); // Pass the record ID to the event redirect.setParams({ "recordId": record }); // Open the record redirect.fire(); }})
Flow Builderでアクションの配置
完成フロー図のようにアクションを貼り付け以下を設定したらフローで使用できるようになる。
以下からがアクションが正常に動かないため注意!!!
- Flow Builder
- フローの詳細ページまたはリストビュー
- Web タブ
- カスタムボタンとカスタムリンク
Author And Source
この問題について(画面フロー完了時にレコードページに画面遷移させるだけの手順), 我々は、より多くの情報をここで見つけました https://qiita.com/sigulog/items/c3ed3068140133b1cf67著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .