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
//SYNC UP WHERE CASE AND ISSUE EXIST | |
// Call Schema to get the report metadata | |
Reports.ReportMetadata reportMd = Reports.ReportManager.describeReport('00O3c000007LMmHEAW').getReportMetadata(); | |
// Run the report and store the rows in a Reports.ReportFactWithDetail object | |
Reports.ReportFactWithDetails factDetails = (Reports.ReportFactWithDetails)Reports.ReportManager.runReport('00O3c000007LMmHEAW', reportMd, true).getFactMap().get('T!T'); | |
// For each row the report returns, update the Case | |
for(Reports.ReportDetailRow detailRow : factDetails.getRows()){ | |
HttpRequest req = new HttpRequest(); | |
req.setHeader('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
<apex:commandButton value="Pass Parameter" onclick="run('{!Account}'); return false;" /> | |
<script> | |
function run (record) | |
{ | |
alert(record); | |
} | |
</script> |
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 ApexPages.StandardSetController itemsSetController{ | |
get{ | |
if(itemsSetController == null) { | |
Item__c[] items = new Item__c[]{}; | |
HttpRequest req = new HttpRequest(); | |
req.setEndpoint('https://'+URL.getSalesforceBaseUrl().getHost()+'/services/data/v35.0/query/?q=SELECT+Id,Name+FROM+Item__c+WHERE+'where_clause'+ORDER+BY+Name+ASC'); | |
req.setMethod('GET'); | |
req.setHeader('Authorization', 'Bearer '+ userInfo.getsessionId()); | |
Boolean done = false; | |
do{ JSONParser parser = JSON.createParser(new Http().send(req).getBody()); |
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
<!-- ******************************* | |
Page: Page Name | |
Purpose: Page to add a BPGC portal file from the Case feed | |
Created On: Developer Name (EMS.JobTitle) | |
Created By: Date | |
Revision History: | |
1. Date (DeveloperName.JobTitle) Change purpose. |
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
/*******************************************************//** | |
@class Class Name | |
@brief Description of the class | |
@testClass Test Class Name | |
@author Developer Name (EMS.JobTitle) | |
@version Date 1 Developer Name (EMS.JobTitle) Purpose of the class | |
Date 2 Developer Name (EMS.JobTitle) - Purpose of the change | |
@bug No known defects. | |
@todo None. | |
@copyright (c)2017 EMS. All Rights Reserved. Unauthorized use is prohibited. |
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
/*******************************************************//** | |
@trigger Trigger Name | |
@object Object that fires trigger | |
@brief Description of the class | |
@handler Handler Name | |
@author Developer Name (EMS.JobTitle) | |
@version Date 1 Developer Name (EMS.JobTitle) Purpose of the trigger | |
Date 2 Developer Name (EMS.JobTitle) - Purpose of the change | |
@bug No known defects. | |
@todo None. |
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 ProcessHandlerShowOpps { | |
public class OpportunityParameter{ | |
@InvocableVariable(required=true) | |
public Id oppId; | |
@InvocableVariable(required=true) | |
public String name; | |
@InvocableVariable(required=true) | |
public Decimal amount; | |
@InvocableVariable(required=true) | |
public Date closeDate; |
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 ProcessHandlerShowAccounts { | |
public class AccountParameter{ | |
@InvocableVariable(required=true) | |
public Id accountId; | |
@InvocableVariable(required=true) | |
public String name; | |
} | |
@InvocableMethod(label='handleNewAccounts' | |
description='Reconstitue the Accounts being inserted based on the variables passed from Process Builder' | |
category='AccountCategory') |
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
// Call Schema to get the report metadata | |
Reports.ReportMetadata reportMd = Reports.ReportManager.describeReport(AnalyticAPISupport__c.getValues('DemoAnalyticAPI').Report_Id__c).getReportMetadata(); | |
//Get the relevant filter in Reports.ReportFilter type variable and set it to the Account Number I'm looking for | |
Reports.ReportFilter filter = reportMd.getReportFilters()[0]; | |
filter.setValue('12345'); | |
// Run the report and store the rows in a Reports.ReportFactWithDetail object | |
// Make sure to use the three parameter version of the Reports.ReportManager class runReport() method to: | |
// 1. Run the report with the filter we just set and... | |
// 2. Return a Reports.ReportFactWithDetails object (as opposed to a summary ReportFactWithSummaries object) | |
Reports.ReportFactWithDetails factDetails = (Reports.ReportFactWithDetails)Reports.ReportManager.runReport(AnalyticAPISupport__c.getValues('DemoAnalyticAPI').Report_Id__c, reportMd, true).getFactMap().get('T!T'); |
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 standardController="Account"> | |
<apex:form > | |
<!-- both inputFields below write to an Account field named Demo_Field__c --> | |
<apex:pageBlock > | |
<apex:pageBlockSection title="Developer 1 below used a static text to talk about the field label" columns="2"> | |
I am talking about a field named "Demo Field"! | |
</apex:pageBlockSection> | |
<apex:pageBlockSection title="Developer 2 below used a schema variable to talk about the field label" columns="2"> | |
I am talking about a field named "{!$ObjectType.Account.fields.Demo_Field__c.Label}"! | |
</apex:pageBlockSection> |
NewerOlder