This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="UploadAttachmentController"> | |
<script type="text/javascript"> | |
function alertFilesize(){ | |
if(window.ActiveXObject){ | |
var fso = new ActiveXObject("Scripting.FileSystemObject"); | |
var filepath = document.getElementById('j_id0:j_id2:fileInput').value; | |
var thefile = fso.getFile(filepath); | |
var sizeinbytes = thefile.size; | |
}else{ | |
var sizeinbytes = document.getElementById('j_id0:j_id2:fileInput').files[0].size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ContactTriggerHandler extends TriggerHandler { | |
public override void beforeInsert() { | |
// Call the static method to populate the address | |
ContactTriggerHandler.populateMailingAddress( (List<Contact>) Trigger.new ); | |
} | |
public override void beforeUpdate() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component > | |
<ltng:require scripts="{!join(',', $Resource.jquery_2_2_4, $Resource.jquery_ui_1_12_1 + '/jquery-ui-1.12.1/jquery-ui.min.js')}" | |
afterScriptsLoaded="{!c.afterScriptsLoaded}" | |
styles="{!$Resource.jquery_ui_1_12_1 + '/jquery-ui-1.12.1/jquery-ui.min.css'}" | |
/> | |
Birth Date: <input aura:id="birthdate" class="datepicker" type="text"/> | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<application extends="force:slds> | |
<!-- customize your application here --> | |
</aura:application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="NamespaceDemoCompController" implements="force:appHostable,flexipage:availableForRecordHome,force:hasRecordId" access="global" > | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<aura:attribute name="namespace" type="String"/> | |
<aura:attribute name="totalAmount" type="Decimal"/> | |
Total Amount : {!v.totalAmount} | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String,Schema.SObjectField> mapFields = Account.getSObjectType().getDescribe().fields.getMap(); | |
List<String> fieldNames = new List<String>(); | |
for( String fieldName : mapFields.keySet() ) { | |
fieldNames.add( fieldName ); | |
// For relationship fields | |
if( Schema.DisplayType.Reference == mapFields.get(fieldName).getDescribe().getType() ) | |
fieldNames.add( mapFields.get(fieldName).getDescribe().getRelationshipName() + '.Name' ); | |
} | |
String query = | |
' SELECT ' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component access="global"> | |
<aura:attribute name="record" type="sObject" description="record which is being displayed"/> | |
<aura:attribute name="field" type="Object" description="field object which is being rendered"/> | |
<aura:attribute name="cellValue" type="Object"/> | |
<aura:attribute name="cellLabel" type="String"/> | |
<aura:attribute name="isTextField" type="boolean" default="false"/> | |
<aura:attribute name="isReferenceField" type="boolean" default="false"/> | |
<aura:attribute name="isDateField" type="boolean" default="false"/> | |
<aura:attribute name="isDateTimeField" type="boolean" default="false"/> | |
<aura:attribute name="isCurrencyField" type="boolean" default="false"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:html tag="style"> | |
.slds-modal__container{ | |
height : auto; width: 80%; max-width: 70vh; | |
} | |
.modal-body{ | |
height : 40vh !important; | |
max-height: 40vh !important; | |
} | |
.slds-modal__footer{ | |
display: inline !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var country_arr = new Array("Afghanistan", "Albania", "Algeria", "American Samoa", "Angola", "Anguilla", "Antartica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Ashmore and Cartier Island", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "British Virgin Islands", "Brunei", "Bulgaria", "Burkina Faso", "Burma", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Clipperton Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo, Democratic Republic of the", "Congo, Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czeck Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Eur |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:application access="global" extends="ltng:outApp" > | |
<c:SampleComp /> | |
</aura:application> |
OlderNewer