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
/* | |
* @Author : Amit Singh | |
* @Date : 22nd Feb 2018 | |
* @Description : Class is responsible for getting the dynamic data and sending back to | |
* : Lightning Component | |
*/ | |
public class DynamicBindingDemoController { | |
/* | |
* @Author : Amit Singh | |
* @Date : 22nd Feb 2018 |
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 implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,force:hasSObjectName" | |
controller='DynamicBindingDemoController' | |
access="global" > | |
<!-- call the doInit method to load the list of All the Available Objects into the Org --> | |
<aura:handler name='init' value='{!this}' action='{!c.doInit}' /> | |
<aura:attribute name='objectList' type='List' /> | |
<aura:attribute name="isSending" type="boolean" /> | |
<c:Spinner /> | |
<div class="slds-m-around_small"> | |
<div class="slds-page-header"> |
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
/* | |
@Author : Amit Singh | |
@BuiltDate : 21st March 2018 | |
@Description : Handler class that will be created by developer and allowed only one for every object | |
*/ | |
public class AccountTriggerHandler implements TriggerInterface{ | |
public void BeforeInsert(List<SObject> newItems) { | |
/* Update the Account name before account inserted into Salesorce */ |
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
/* | |
@Author : Amit Singh | |
@BuiltDate : 21st March 2018 | |
@Description : Account Trigger that will call the RUN mthos of TriggerDispatcher class | |
*/ | |
trigger AccountTrigger on Account (before insert, after insert, before update, after update, before delete, after delete, after undelete) { | |
TriggerDispatcher.run(new AccountTriggerHandler() , 'Account'); | |
} |
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
({ | |
onInit : function(component, event, helper) { | |
/* Call the Apex class method to fetch the List of all object */ | |
var action = component.get('c.listAllObject'); | |
action.setCallback(this, function(response){ | |
var state = response.getState(); | |
if(state === 'SUCCESS' && component.isValid()){ | |
/* set the value to the attribute of the component */ | |
var responseValue = response.getReturnValue(); | |
var lstOptions = []; |
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
Login_User__c loginUserSetting = Login_User__c.getOrgDefaults(); | |
String Session_Id; | |
If(loginUserSetting !=null){ | |
Organization orgInfo = [Select Id, Name, isSandbox From Organization LIMIT 1]; | |
String endPoint = ''; | |
If(orgInfo.isSandbox) | |
endPoint = 'https://test.salesforce.com/services/oauth2/token'; | |
else | |
endPoint = 'https://login.salesforce.com/services/oauth2/token'; | |
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
@isTest | |
public class BookManager_UnitTest { | |
public static testMethod void unitTest_PostMethod(){ | |
RestRequest request = new RestRequest(); | |
request.requestURI = '/services/apexrest/v1/BookManagement/'; | |
request.httpMethod = 'POST'; | |
request.addHeader('Content-Type', 'application/json'); | |
request.addHeader('Accept', 'application/json'); | |
//request.addHeader('Authorization', 'Bearer '+Userinfo.getSessionId()); |
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 AllAccounts_MapController { | |
@AuraEnabled | |
public static List<Account> getAccList(){ | |
List<Account> accList = new List<Account>(); | |
accList = [Select Id, Name, ShippingStreet, ShippingCity, ShippingState, | |
ShippingPostalCode, ShippingCountry From Account | |
Where ShippingStreet!=null AND ShippingCity!= null AND ShippingState != null | |
AND ShippingPostalCode!= null AND ShippingCountry!=null]; | |
return accList; | |
} |
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 QuickbookConnection{ | |
// Replase with your Client Id | |
public static String client_Id = 'Q0lUVQVbYhzGMzNuBe2AFc8AiQL82BPOBpIILFlqteae8aTz8H'; | |
// Replase with your Client Secret | |
public static String consumer_Secret = 'qjhhpmfSuB0Yk5X6aQSXc5r3DgYS9jhOLVcbBsHV'; | |
// Replace with Your Redirect URI | |
public static String redirect_URI = 'https://dreamhouse-a-dev-ed--c.ap5.visual.force.com/apex/QuickbookConnection'; | |
/* | |
* @Name - doAuthorizationQuickBooks |
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
.THIS{ | |
background: cadetblue; | |
} | |
.THIS.c-container { | |
border: 1px solid #d8dde6; | |
margin: 10px 0 20px 0; | |
} | |
.THIS .page-section { | |
border: solid 1px #ccc; |
OlderNewer