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
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
//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()); |
OlderNewer