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
trigger ContactTrigger on Contact (after delete, after insert, after undelete, | |
after update, before delete, before insert, before update) { | |
if(trigger.isAfter && trigger.isInsert){ | |
Map<String,List<Contact>> mapIdByList=ParentChildMapHelper.buildGeneralisedMap('AccountId',trigger.new); | |
system.debug(mapIdByList); | |
} | |
} |
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
Map<String,List<Contact>> mapIdByList=(Map<String,List<Contact>>)ParentChildMapHelper.buildGeneralisedMap('AccountId',lstsobject); | |
system.debug('My new Map '+mapIdByList); |
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
global class WeatherApp implements Process.Plugin { | |
// The main method to be implemented. The Flow calls this at runtime. | |
global Process.PluginResult invoke(Process.PluginRequest request) { | |
// Get the State and City From Flow | |
String State = (String) request.inputParameters.get('state'); | |
String City = (String) request.inputParameters.get('city'); | |
// Use the API to call and fetch Weather Info | |
WeatherInfo weatherinformation=new WeatherInfo(); |
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 WeatherInfo { | |
public class Current_observation { | |
public Image image; | |
public Display_location display_location; | |
public Observation_location observation_location; | |
public Estimated estimated; | |
public String station_id; | |
public String observation_time; | |
public String observation_time_rfc822; |
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
<!--*! | |
* @version 1.0 | |
* | |
* A simple yet powerful JQuery star rating plugin that allows rendering | |
* fractional star ratings | |
* | |
* This pulgin is customized from JQuery plugins at http://plugins.krajee.com/star-rating | |
* | |
*--> | |
<apex:page sidebar="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0" controller="RatingDemoCtrl"> |
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
/* | |
@Name : RatingDemoCtrl | |
@description : The following class consists of logic to upsert the rating for Parent record.This plugin assumes Account has a Junction record where user rating is inserted | |
*/ | |
public with sharing class RatingDemoCtrl{ | |
public RatingDemoCtrl(){ | |
lstacc=new List<Account>(); | |
lstacc=[Select Id,Name,(Select RatingScore__c from Account_Ratings__r where User__c=:userinfo.getuserID() limit 1) from Account Limit 10]; | |
} |
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
//------------------------------------------------------------------------------ | |
// <copyright file="WebDataService.svc.cs" company="Microsoft"> | |
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// </copyright> | |
//------------------------------------------------------------------------------ | |
using System; | |
using System.Collections.Generic; | |
using System.Data.Services; | |
using System.Data.Services.Common; | |
using System.Linq; |
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
trigger AccountTrigger on Account(before insert,after insert,before update,after update,before delete,after delete,after undelete){ | |
if(trigger.isbefore && trigger.isinsert){ | |
system.debug('BEFORE INSERT'+trigger.new); | |
} | |
if(trigger.isafter && trigger.isinsert){ | |
system.debug('AFTER INSERT'+trigger.new); | |
system.debug('AFTER INSERT MAP'+trigger.newmap); | |
} | |
if(trigger.isafter && trigger.isupdate){ | |
system.debug('AFTER UPDATE NEW'+trigger.new); |
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 Futureapexcallout{ | |
@future(Callout=true) | |
public static void apexcallout(string billingstate,string billingcity,Id AccountId){ | |
// Instantiate a new http object | |
Http h = new Http(); | |
// Instantiate a new HTTP request, specify the method (GET) as well as the endpoint | |
HttpRequest req = new HttpRequest(); |
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 LinkedInParser{ | |
public String emailAddress{get;set;} //[email protected] | |
public String id{get;set;} //k4UiLk0S8c | |
public cls_languages languages{get;set;} | |
public cls_location location{get;set;} | |
public Integer numConnections{get;set;} //334 | |
public String pictureUrl{get;set;} //https://media.licdn.com/mpr/mprx/0__HjzfUfekIOzW4-Rh2LzFgge5f3H7HlUWHWUWaIe5uiW742F7MLRG7EWFI7H7d2RdHLzT4dd2Ipd22OUWU4dF7kLWIpe22ecWU492mlHCodX6VPwLomZuVxJdY6Z5206h4yJwp-201P | |
public cls_publications publications{get;set;} | |
public cls_skills skills{get;set;} |