Rich Publisher Apps platform
The Rich Publisher Apps platform gives you all the necessary tools for creating and integrating interactive apps into your feed’s publisher. There are three ways to add a Rich Publisher ....
The Rich Publisher Apps platform gives you all the necessary tools for creating and integrating interactive apps into your feed’s publisher. There are three ways to add a Rich Publisher ....
Sample Code: Component: <aura:component implements="force:appHostable" controller="AccountListController"> <aura:attribute type="Account[]" name="acctList"/> <aura:attribute name="mycolumns" type="List"/> <aura:handler name="init" value="{!this}" action="{!c.init}"/> <div style="height: 300px"> <lightning:datatable data="{! v.acctList }" columns="{! v.mycolumns }" keyField="Id" hideCheckboxColumn="false" enableInfiniteLoading="true" onloadmore="{! ....
Sample Code: Component: <aura:component implements="force:appHostable" controller="AccountListController"> <aura:attribute type="Account[]" name="acctList"/> <aura:attribute name="mycolumns" type="List"/> <aura:handler name="init" value="{!this}" action="{!c.fetchAccounts}"/> <lightning:datatable data="{! v.acctList }" columns="{! v.mycolumns }" keyField="Id" hideCheckboxColumn="true"/> </aura:component> Component Controller: ({ fetchAccounts ....
disabled attribute on the button type in the lightning:datatable can be used to Disable and Enable button. Sample Code: Apex Classes: Wrapper Class: public class AccountWrapper { @AuraEnabled public String ....
Sample Code: AccountListController.apex: public class AccountListController { @AuraEnabled public static List < Account > fetchAccts() { return [ SELECT Id, Name, Industry, Type FROM Account LIMIT 10 ]; } } ....
Sample Code: Component: <aura:component implements="flexipage:availableForAllPageTypes,force:appHostable" > <lightning:recordEditForm recordId="0036A00000QAY0CQAX" objectApiName="Contact" onsuccess="{!c.callSuccess}"> <lightning:messages /> <lightning:inputField fieldName="FirstName" /> <lightning:inputField fieldName="LastName" /> <lightning:inputField fieldName="Email" /> <lightning:button class="slds-m-top_small" variant="brand" type="submit" name="update" label="Update"/> </lightning:recordEditForm> </aura:component> Controller: ....
Sample Code:AccountList.cmp: <aura:component implements="force:appHostable" controller="AccountListController"> <aura:attribute type="Account[]" name="acctList"/> <aura:attribute name="gridColumns" type="List" /> <aura:attribute name="gridData" type="Object" /> ....
Error Handling in Lightning Component's JavaScript Controller is important. The try statement in JavaScript helps us to test a block of code for errors. The catch statement in JavaScript helps us ....
Apex class: public class USStateCodeController { @AuraEnabled public static List < US_State_Codes__mdt > fetchUSStateCodes() { return [ SELECT Label, State_Code__c FROM US_State_Codes__mdt ORDER BY Label ]; } } USStateCode.cmp: <aura:component ....
Sample Code: <aura:component implements="force:appHostable" > <aura:attribute name="oppty" type="Opportunity" ....