I have a lightning quick action that needs to check the sObjectName to trigger a conditional action that will fill some fields depending on it.
The problem that I encounter is that when using the implements for the lightning quick action and the hasSObjectName the value is empty but I can get the recordId using the same method and there's no error.
<aura:component description="ClonePricebook"
implements="flexipage:availableForAllPageTypes,
flexipage:availableForRecordHome,
force:lightningQuickAction,
force:hasRecordId,
force:hasSObjectName"
access="global">
<p>{!v.recordId}</p> //Filled
<p>{!v.sObjectName}</p> // Empty
</aura:component>
According to the release notes of Summer 17 (https://releasenotes.docs.salesforce.com/en-us/summer17/release-notes/rn_lightning_force_hassobjectname.htm) I should be able to use it inside a quick action.
Why can't I get the sObjectName in this case ?