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
/** | |
* @dateString : format should be like this 2018-06-10T12:34:15.29 | |
*/ | |
public DateTime parseDate(String dateString){ | |
String dateStringJSON = ('{ "thedate": "'+dateString+'"}'); | |
Map<String, DateTime> mockMap; | |
mockMap = (Map<String, DateTime>)JSON.deserialize(dateStringJSON, Map<String, DateTime>.class); | |
return mockMap.get('thedate'); | |
} |
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 without sharing class LightningUtilController { | |
/** | |
* Method to update sobject record | |
* @param theSObject | |
* @return returns the created/updated sobject record | |
*/ | |
@AuraEnabled | |
public static SObject upsertSObjectCtrl(SObject theSObject){ | |
try{ |
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
/** | |
* @ApexClass : JSONObject | |
* @Author : Kiran Machhewar | |
* @Description : This class can be used to parse and work with json data in apex easy. | |
*/ | |
public class JSONObject { | |
public String jsonString; //to hold the json string | |
private Object jsonObject; //to hold the deserialized json data |
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 Kiran Machhewar | |
* @date 26th June 2018 | |
* @description Controller class for so and so page | |
*/ | |
public class ApexClass{ | |
} |
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="flexipage:availableForRecordHome,force:hasRecordId,flexipage:availableForAllPageTypes" | |
controller="<CONTROLLER_NAME>" access="global"> | |
<aura:attribute name="recordId" type="Id" /> | |
<aura:attribute name="showSpinner" type="Boolean" default="false" /> | |
<aura:handler name="init" action="{!c.doInit}" value="{!this}"/> | |
<!-- Spinner component --> | |
<aura:if isTrue="{!v.showSpinner}"> |
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
List<Group> groups = [SELECT Id FROM Group WHERE Name in ('<QUEUE NAME>') AND Type = 'Queue' ]; | |
List<User> usersToBeAdded = [SELECT Id FROM User WHERE Username in ('<user_email_id>')]; | |
List<GroupMember> groupMembershipRecordsToBeCreated = new List<GroupMember>(); | |
for(Group gp : groups){ | |
for(User theUser : usersToBeAdded){ | |
groupMembershipRecordsToBeCreated.add(new GroupMember( | |
GroupId = gp.Id, | |
UserOrGroupId = theUser.Id | |
)); | |
} |
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
<!-- LIGHTNING COMPONENT TEMPLATE BEGIN --> | |
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,flexipage:availableForAllPageTypes" | |
controller="<CONTROLLER_NAME>" access="global"> | |
<aura:attribute name="recordId" type="Id" /> | |
<aura:attribute name="showSpinner" type="Boolean" default="false" /> | |
<aura:handler name="init" action="{!c.doInit}" value="{!this}"/> |
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
FROM alpine | |
RUN apk update | |
RUN apk add bash | |
RUN apk add openssh | |
RUN apk add git | |
RUN apk add openjdk8 | |
RUN apk add apache-ant --update-cache \ | |
--repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ \ | |
--allow-untrusted | |
ENV ANT_HOME /usr/share/java/apache-ant |
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 > | |
<apex:includeLightning /> | |
<div id="lightning" /> | |
<button type="button" onclick="callLightningEvent();">Call Lightning Code From VF</button> | |
<script> | |
window.onload = function() { | |
$Lightning.use("c:LightningOutExampleApp", function() { | |
var comapp=$Lightning.createComponent("c:LightningOutExample", | |
{}, | |
"lightning", |
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"> | |
<aura:dependency resource="c:LightningOutExample"/> | |
</aura:application> |