• Banshi Lal Dangi
  • NEWBIE
  • 0 Points
  • Member since 2018
  • Lead Salesforce Consultant

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 2
    Replies
By default company name shows in chatter post header along with the User Name or Nickname. So is there any way to control visibility of Company Name like the others :
 
User.UserPreferencesShowMobilePhoneToGuestUsers
User.UserPreferencesShowMobilePhoneToExternalUsers
User.UserPreferencesShowEmailToGuestUsers
User.UserPreferencesShowEmailToExternalUsers

 
<lightning:input aura:id="startDate" type="date" name="startDate" label="Date" messageWhenValueMissing="You must specify Date" required="true" />

But it always showing message ="Complete this field." And If I change type="text" it works perfectly.
<lightning:input aura:id="startDate" type="date" name="startDate" label="Date" messageWhenValueMissing="You must specify Date" required="true" />

But it always showing message ="Complete this field." And If I change type="text" it works perfectly.
Hi Folks,

I have set a custom error message using setCustomValidity() in lightning, while clearing it is not working for lightning:input date fields. Seems it is issue from Salesforce. Please let me know if there is any workaround.

Here is the example:
Lightning Component:
<aura:component implements="force:appHostable" >
    <lightning:card footer="Card Footer" title="Hello">
        <lightning:input Label="Name" aura:id="name" value="{!v.acc.Name}" required="true"/>
        <lightning:input type="date" aura:id="date" label="Enter a date" required="true" value="{!v.acc.dhr__Custom_Date_Time__c}"/>
        <lightning:input type="date" label="Enter a date" required="true" value="{!v.acc.dhr__SLA_Expiration_Date_Time__c}"/>
        
        <lightning:button variant="brand" label="Handle Form" title="Brand action" onclick="{! c.handleForm }" />
    </lightning:card>
</aura:component>


Javascript Controller:
({
	handleForm : function(component,event,helper){
        var nameCmp = component.find("name");
        if(!$A.util.isEmpty(component.get("v.acc.Name")) && component.get("v.acc.Name")=="Salesforce"){
        	nameCmp.setCustomValidity("Name cannot be Salesforce") ;
        }else{
            nameCmp.setCustomValidity("") ;
        }
        nameCmp.reportValidity() ;
        
        var dateCmp = component.find("date");
        if(component.get("v.acc.dhr__Custom_Date_Time__c") >   component.get("v.acc.dhr__SLA_Expiration_Date_Time__c")){
        	dateCmp.setCustomValidity("Cannot be future..") ;
        }else{
            alert('clearing..');
            dateCmp.setCustomValidity("") ;
        }
        dateCmp.reportValidity() ;
    }
})


Is there any way to use SOQL on the Topic standard objects to know which topic is a featured topic and which is a navigational topic?
Hi Folks,

I have set a custom error message using setCustomValidity() in lightning, while clearing it is not working for lightning:input date fields. Seems it is issue from Salesforce. Please let me know if there is any workaround.

Here is the example:
Lightning Component:
<aura:component implements="force:appHostable" >
    <lightning:card footer="Card Footer" title="Hello">
        <lightning:input Label="Name" aura:id="name" value="{!v.acc.Name}" required="true"/>
        <lightning:input type="date" aura:id="date" label="Enter a date" required="true" value="{!v.acc.dhr__Custom_Date_Time__c}"/>
        <lightning:input type="date" label="Enter a date" required="true" value="{!v.acc.dhr__SLA_Expiration_Date_Time__c}"/>
        
        <lightning:button variant="brand" label="Handle Form" title="Brand action" onclick="{! c.handleForm }" />
    </lightning:card>
</aura:component>


Javascript Controller:
({
	handleForm : function(component,event,helper){
        var nameCmp = component.find("name");
        if(!$A.util.isEmpty(component.get("v.acc.Name")) && component.get("v.acc.Name")=="Salesforce"){
        	nameCmp.setCustomValidity("Name cannot be Salesforce") ;
        }else{
            nameCmp.setCustomValidity("") ;
        }
        nameCmp.reportValidity() ;
        
        var dateCmp = component.find("date");
        if(component.get("v.acc.dhr__Custom_Date_Time__c") >   component.get("v.acc.dhr__SLA_Expiration_Date_Time__c")){
        	dateCmp.setCustomValidity("Cannot be future..") ;
        }else{
            alert('clearing..');
            dateCmp.setCustomValidity("") ;
        }
        dateCmp.reportValidity() ;
    }
})