This file contains hidden or 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_js, $Resource.jquery_ui_1_12_1 + '/jquery-ui.min.js')}" | |
| afterScriptsLoaded="{!c.afterScriptsLoaded}"/> | |
| <ltng:require styles="{!$Resource.jquery_ui_1_12_1 + '/jquery-ui.min.css'}"/> | |
| <p> | |
| Start Date: <input aura:id="startDate" type="text" onfocus="{!c.initDatePicker}"/> | |
| </p> |
This file contains hidden or 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> | |
| <aura:attribute name="title" type="String" required="true" /> | |
| <aura:attribute name="closeable" type="Boolean" default="true"/> | |
| <aura:attribute name="closeLabel" type="String" default="Close"/> | |
| <aura:attribute name="cancelLabel" type="String" default="Cancel"/> | |
| <aura:attribute name="confirmLabel" type="String" default="OK"/> | |
| <aura:attribute name="onclose" type="Aura.Action" default="{!c.defaultCloseAction}"/> |
This file contains hidden or 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
| ({ | |
| someMethod : function( component, event, helper ) { | |
| var helper = this; | |
| helper.callAction( component, 'c.someApexMethod', { | |
| 'someParam' : component.get( 'v.someAttribute' ) | |
| }).then( $A.getCallback( function( data ) { |
This file contains hidden or 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
| /** | |
| * https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_QuickAction_QuickActionDefaultsHandler.htm | |
| */ | |
| public class EmailQuickActionDefaultsHandler implements QuickAction.QuickActionDefaultsHandler { | |
| public void onInitDefaults( QuickAction.QuickActionDefaults[] actionDefaults ) { | |
| for ( QuickAction.QuickActionDefaults actionDefault : actionDefaults ) { | |
| System.debug( actionDefault ); |
This file contains hidden or 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:component > | |
| <!-- | |
| Visualforce pages added to page layouts are embedded via iframes. | |
| That means the default link behavior of content in the iframe (aka, this page) | |
| loads within that iframe rather than changing the browser's actual address bar. | |
| We want when the users click the report charts that the entire page redirects | |
| to the report chart rather than simply loading the report data in the iframe. |
This file contains hidden or 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 showHeader="false" showChat="false" sidebar="false" standardStylesheets="false"> | |
| <script type="text/javascript"> | |
| // URL must be prefixed with http:// or https:// | |
| // otherwise it will be considered a relative URL in your Salesforce instance | |
| // e.g. https://<your_instance>.visual.force.com/apex/www.google.com | |
| window.location = 'https://www.google.com'; | |
| </script> | |
| </apex:page> |
This file contains hidden or 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
| @isTest | |
| private class MyTestClass { | |
| @isTest | |
| static void test_something() { | |
| Profile p = [ SELECT id FROM Profile WHERE name = 'Standard User' ]; | |
| User user1, user2; |
This file contains hidden or 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
| /** | |
| * https://twitter.com/Joy_SH/status/738087166547398656 | |
| * https://help.salesforce.com/apex/HTViewSolution?id=000175908&language=en_US | |
| */ | |
| public with sharing class LeadConvertedViewController { | |
| public Lead record { get; private set; } | |
| public LeadConvertedViewController( ApexPages.StandardController stdController ) { | |
| this.record = (Lead) queryRecord( stdController.getId() ); |
This file contains hidden or 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 RedirectApexController { | |
| public RedirectApexController( ApexPages.StandardController stdController ) {} | |
| public PageReference redirect() { | |
| // ... do some logic to determine where to redirect to ... | |
| PageReference page = new PageReference('/apex/MyPage'); | |
| // pass any parameters that came in on request on to the final destination |