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
@RestResource(urlMapping='/v1/account/*') | |
global class AccountPatchAPI { | |
@HttpPatch | |
global static Account patch() { | |
RestRequest req = RestContext.request; | |
// Deserialize the JSON string into name-value pairs | |
// Iterate through each parameter field and value | |
List<APIMapper__c> mappers=[select id,FieldName__c,MappedFieldAPI__c from APIMapper__c where name='AccountPatch']; | |
Map<string,string> mapFields=new Map<string,string>(); |
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
global class FieldExplorerController | |
{ | |
@Auraenabled(cacheable=true) | |
public static List<string> getObjects() | |
{ | |
List<string> sObjectList = new List<string>(); | |
for(Schema.SObjectType objTyp : Schema.getGlobalDescribe().Values()){ | |
String name = objTyp.getDescribe().getName(); | |
if((!name.containsignorecase('history') && !name.containsignorecase('tag')&& |
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
<template> | |
<lightning-card> | |
<div class="divcenter">SalesforceCodex Field's Access Explorer</div> | |
<lightning-layout multiple-rows> | |
<lightning-layout-item size="2" padding="around-small"> | |
<lightning-combobox name="objectName" | |
label="Object" | |
value="" | |
placeholder="Select Object" |
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
global class FieldExplorerController { | |
//Retrieve All Custom Object in Org | |
@Auraenabled(cacheable=true) | |
global static List<String> getAllCustomSObjects() | |
{ | |
List<String> sObjectList = new List<String>(); | |
for(Schema.SObjectType objTyp : Schema.getGlobalDescribe().Values()) | |
{ | |
Schema.DescribeSObjectResult describeSObjectResultObj = objTyp.getDescribe(); |
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
/* parent.css */ | |
divcenter { | |
text-align: center; | |
} | |
.divSize | |
{ | |
height: 400px; | |
} |
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
//Service Request Interface | |
public interface IServiceRequest { | |
string createServiceRequest(ServiceRequestDTO request); | |
} |
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: Dhanik Lal Sahni | |
* Date: Oct 8, 2019 | |
* Descpription: Implementation class for IServiceRequest to creating Case. | |
*/ | |
public class CaseServiceRequest implements IServiceRequest{ | |
//validate information | |
private string validateServiceRequest(ServiceRequestData 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: Dhanik Lal Sahni | |
* Date: Oct 8, 2019 | |
* Descpription: Implementation class for IServiceRequest to change account's address. | |
*/ | |
public class AddressChangeServiceRequest implements IServiceRequest{ | |
//validate information | |
private string validateServiceRequest(ServiceRequestData 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: Dhanik Lal Sahni | |
* Date: Oct 8, 2019 | |
* Descpription: Service Request Paramter information. | |
*/ | |
public class ServiceRequestData { | |
public String accountId; | |
public String dateSent; | |
public String origin; |
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 | |
controller="S3Controller" | |
implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" | |
access="global"> | |
<aura:attribute name="data" type="String" /> | |
<aura:attribute name="recordId" type="String" /> | |
<aura:attribute name="showFileLink" type="boolean" /> | |
<lightning:button variant="brand" label="View Files" onclick="{!c.getData}" /> | |
<aura:if isTrue="{!v.showFileLink}"> | |
<a href="{!v.data}">Download File</a> |