From Salesforce Spring ’18 release, list custom settings option is grayed out. The default “Manage List Custom Settings Type” is disabled, to allow the creation of List Custom Settings you have to enable “Manage List Custom Settings Type”.
To enable it : Go to Setup | Data or Search “Schema Settings” in Quick Find | Click Schema Settings | Enable “Manage List Custom Settings Type”.
From Setup enter “Chatter Settings” in the Quick Find box
Select “Chatter Settings”
Check “Users can set Out of Office messages”
Save
Set an Out of Office Message in Chatter:
Open your profile
In your profile page, click on “Out of Office”.
Enable Set Out of Office message.
Select the start date for the time you’ll be out of the office. The start date is just to let people know when you’ll be out. The message starts showing up next to your name as soon as you save it. It doesn’t wait for the start date.
Select the end date. Your message expires after the end date.
Implementing lightning:hasPageReference interface, we can access the recordTypeId in lightning JS controller. lightning:hasPageReference provides access to the pageReference attribute.
The pageReference attribute can be populated only for the following page types:
<aura:component implements="force:hasRecordId,lightning:actionOverride,lightning:hasPageReference">
<!--Declare Attributes-->
<aura:attribute name="selectedRecordId" type="Id" />
<!--Declare Handler-->
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<!--Component Start-->
<div class="slds-m-around--xx-large">
Selected Record Type Id : {!v.selectedRecordId}
</div>
<!--Component End-->
</aura:component>
Lightning JS Controller:
({
doInit: function(component, event, helper) {
//get record type Id
var recordTypeId = component.get("v.pageReference").state.recordTypeId;
component.set("v.selectedRecordId", recordTypeId);
//get action name edit/new
var actionName = component.get("v.pageReference").attributes.actionName;
console.log('actionName-' + actionName);
//get object API name
var objectApiName = component.get("v.pageReference").attributes.objectApiName;
console.log('objectApiName-' + objectApiName);
},
})
Output:
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptReject