When viewing the Activity composer related list, you may notice that some activity actions within the lightning experience do not appear on records even though those actions have been added to the Salesforce1 and Lightning Experience Actions section.
Example:
-New Event
-New Task
-Log a Call
If any of the actions above are missing and you have checked the page layouts to ensure they have been added, then it may be related to not associating a record types with any of those 3 specific global actions.
To confirm this,
- In the Lightning Experience, Setup Home | User Interface | Global Actions | Global Actions
- In Aloha Classic, Setup | Global Actions
- Click Edit next to any of the missing global actions (New Event, New Task, Log a Call)
- Look at the 'Record Type' pick list and see if the selected value is Not one of your custom record types or if it says --Master--
Resolution
To resolve the issue, you will have up update the Record Type to be set to a default value that is one of the custom record types. --Master-- will not work.
Note: If you have no custom record types for these objects (Tasks, Events) then you won't be able to select any Record Type. If you do have custom record types, it needs to be associated with the global action to work in the lightning experience under the Activity composer.
The only solution I found so far is the following.
Implementing custom component Buttons
which implements flexipage:availableForRecordHome
and force:hasRecordId
interfaces
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<lightning:button variant="brand" label="XXXX" onclick="{! c.action }"/>
</aura:component>
and contains one or several buttons.
In the lightning controller I can define the action for button click event.
({
action : function(component, event, helper) {
alert('x');
}
})
Then I can put that component to User Records Page just beneath the Highlights Panel.
and thus having it on user layout in Lightning Experience interface.
For Salesforce Classic interface I have to create Lightning Out application
<aura:application extends="ltng:outApp" >
<aura:dependency resource="c:Buttons"/>
</aura:application>
Then Visualforce page which will use Lightning Out Application and Lightning Component
<apex:page standardStylesheets="false" showHeader="false" sidebar="false" standardController="User" >
<apex:includeScript value="/lightning/lightning.out.js" />
<div id="lightning" />
<script>
$Lightning.use("c:ButtonsOut", function() {
// Write a function that creates the component on the page
$Lightning.createComponent("c:Buttons",
{},
"lightning",
function(cmp) {
});
});
</script>
<style>
body{
margin: 0;
}
</style>
</apex:page>
Then I have to modify layout and put page to the top available section of the User Layout.
Unfortunately, I can't put it above the Standards Fields section. Nor by point and click configuration neither by layout XML ANT Deployment Tool hacking.
Best Answer
I noticed that, if we have record types on task object, the standard buttons will not show up in the Activity publisher. We may have to create Quick Actions to create Tasks. If we create quick actions, then they will show up in the Activity tab automatically.