Adding Lightning Components as global and object-specific actions

The other way you can incorporate Lightning Components in the Salesforce mobile application is via the Lightning-Quick action or Global actions.

The difference between a global action and a lightning-quick action is that global actions are available from the Chatter tab (they appear in the top right in Lightning Experience) and are available across, while an object-specific action only appears in the record detail view of the object (provided they are part of the page's layout).

Note that in Lightning Experience, these actions open within a modal.

To make a Lightning Component available for a global action, use the force:lightningQuickAction interface on the Lightning Component. Take a look at this code line:

<aura:component implements="force:lightningQuickAction">

Let's create a global action for a YouTube search that uses the YouTube search component. To create it in Salesforce, navigate to Setup|Global Actions.

The following screenshot shows how to create a global action:

For the global action to appear, you need to add the Lightning Component to the publisher layout, as shown in the following screenshot:

Screenshot shows the Publisher Layout configuration to add Custom Lightning Component as Quick Action

Once you have added the global action, if you are on the Chatter tab, you can see the global action, as shown in following screenshots:

Similarly, you can also use a Lightning Component on object-specific actions. You can include it in the page layout, and this appears when a record detail is viewed. 

Use force:lightningQuickActionWithoutHeader if you want to remove the header from the quick action and add your own headers to the customized Lightning Component.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.173.238