Skip to content

Instantly share code, notes, and snippets.

View arun12209's full-sized avatar
🥑

Arun Kumar arun12209

🥑
View GitHub Profile
@arun12209
arun12209 / AccountsOnMapCSS
Created February 21, 2020 18:03
AccountsOnMapCSS
.THIS #container{
border: 1px solid rgb(221, 219, 218);
}
@arun12209
arun12209 / AccountOnMapHelper
Created February 21, 2020 18:02
AccountOnMapHelper
({
loadMap : function(component,event,helper,account) {
var mapsArray = [];
for(let index=0; index < account.length; index++){
var Mobj = {
location: {
Street: account[index].BillingStreet,
City: account[index].BillingCity,
PostalCode: account[index].BillingPostalCode,
@arun12209
arun12209 / AccountOnMapController
Created February 21, 2020 18:01
AccountOnMapController
({
doInit : function(component, event, helper) {
let action = component.get("c.fetchAllAccounts");
action.setCallback(this,function(response){
let state = response.getState();
if(state =='SUCCESS'){
let result = response.getReturnValue();
console.log('Result returned: ' +JSON.stringify(result));
component.set("v.accObj",result);
@arun12209
arun12209 / AccountsOnMap
Created February 21, 2020 18:00
AccountsOnMap
<aura:component controller="LightningMapCntrl" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<!-- aura attributes -->
<aura:attribute name="mapMarkers" type="Object"/>
<aura:attribute name="centerObj" type="Object" />
<aura:attribute name="zoomLevel" type="Integer" />
<aura:attribute name="markersTitle" type="String" />
<aura:attribute name="showFooter" type="Boolean" />
<aura:attribute name="recordId" type="string"/>
<aura:attribute name="accObj" type="Account[]"/>
<!-- Init handlers-->
@arun12209
arun12209 / companyProfileCSS
Created December 28, 2019 16:45
companyProfileCSS
.THIS #overview{
word-wrap: break-word;
white-space: pre-wrap;
}
.THIS #Addresses{
word-wrap: break-word;
white-space: inherit;
@arun12209
arun12209 / FullContactAccountDetailsContrl
Created December 28, 2019 16:40
FullContactAccountDetailsContrl
public class FullContactAccountDetailsContrl {
@AuraEnabled
public static string getAccountDetails(string rec_id){
String msg = '';
try{
Account acc=[select Website from account where id=:rec_id ];
system.debug('domain : '+ acc.Website);
if(acc.Website != null && acc.Website != ''){
@arun12209
arun12209 / companyProfileHelper
Created December 28, 2019 16:38
companyProfileHelper
({
fetchCompanyProfile : function(component,event,helper) {
var action=component.get("c.getAccountDetails");
action.setParams({
"rec_id": component.get("v.recordId")
});
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
@arun12209
arun12209 / companyProfileController
Created December 28, 2019 16:37
companyProfileController
({
doInit : function(component, event, helper) {
helper.fetchCompanyProfile(component,event,helper);
}
})
@arun12209
arun12209 / companyProfile
Created December 28, 2019 16:35
companyProfile Component
<aura:component controller="FullContactAccountDetailsContrl" implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" Access="global" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<aura:attribute name="recordId" type="Id" />
<aura:attribute name="photo" type="string"/>
<aura:attribute name="details" type="object"/>
<aura:attribute name="err" type="string"/>
<div id="content">
<div class="slds">
@arun12209
arun12209 / HelloCustomer.xml
Created December 21, 2019 05:01
HelloCustomer.xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="HelloCustomer">
<apiVersion>47.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
<target>lightning__Tab</target>
</targets>