Skip to content

Instantly share code, notes, and snippets.

View dhaniksahni's full-sized avatar

Dhanik Lal Sahni dhaniksahni

View GitHub Profile
@dhaniksahni
dhaniksahni / imageControl.css
Created October 10, 2019 04:01
Custom Data Type for Image in Lightning Web Component
.image
{
height: 30px;
width: 30px;
}
@dhaniksahni
dhaniksahni / imageTableControl.html
Created October 10, 2019 04:10
Extend Lightning Web Component Data Table
<template>
<c-image-control url={value}
alt-text="Image Not Found">
</c-image-control>
</template>
@dhaniksahni
dhaniksahni / showProfile.html
Created October 10, 2019 04:37
Use Extended Data Table in Lightning Web Component
<template>
<c-salesforce-codex-data-table
                key-field="id"
                data={data}
                show-row-number-column="false"
                hide-checkbox-column="false"
                columns={columns}>
 </c-salesforce-codex-data-table>
</template>
@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>();
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')&&
<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"
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();
/* parent.css */
divcenter {
text-align: center;
}
.divSize
{
height: 400px;
}
//Service Request Interface
public interface IServiceRequest {
string createServiceRequest(ServiceRequestDTO request);
}
/******************************************************************************
* 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;