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
<template> | |
<lightning-card title="Subscriber Component"> | |
<div style="background-color:#a3ce98;border-style: solid;margin:5%;padding:2%;"> | |
<p>This component is using LMS framework to subscribe message</p> | |
<div style="background-color:#7ff6f6;border-style: solid;padding:2%;"> | |
<p>Email-<b>{conEmail}</b></p> | |
</div> | |
<div style="background-color:#7ff6f6;border-style: solid;padding:2%;"> | |
<p>Phone-<b>{conPhone}</b></p> | |
</div> |
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
<template> | |
<div style="background-color:#b2b689;border-style: solid;padding:2%;"> | |
<b>Child component</b> | |
<div style="background-color:#7ff6f6;border-style: solid;padding:2%;"> | |
<p>Getting value from parent using public property @api decorator</p> | |
<p>URL passed from parent-<b>{passedUrl}</b></p> | |
</div> | |
<div style="background-color:#7ff6f6;border-style: solid;padding:2%;"> |
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 SK_CustomMetadataUtility { | |
public static void exportAllCMRecordsInCSV(){ | |
Map<string,List<string>> objToFieldsMap = new Map<string,List<string>>(); | |
Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); | |
for(String ss1: schemaMap.keyset()){ | |
Schema.SObjectType objToken=schemaMap.get(ss1); | |
//find details about sobject | |
Schema.DescribeSObjectResult objDescribe=objToken.getdescribe(); | |
string objAPIName= string.valueof(objDescribe.getName()); |
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
<template> | |
<lightning-card title="Launch Standard Email Composer in LWC"> | |
<div style="background-color:#E6E6FA;border-style: solid;height:200px;margin:5%;padding:2%;"> | |
<lightning-button variant="neutral" label="Send an Email" onclick={onButtonClick}></lightning-button> | |
</div> | |
</lightning-card> | |
</template> |
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
string parentRecordId='0012800001IrqlyAAB'; | |
string orgbaseUrl=URL.getSalesforceBaseUrl().toExternalForm(); | |
string downloadAllFileUrl=orgbaseUrl+'/sfc/servlet.shepherd/version/download'; | |
List<string> contentVersionIdList = new List<string>(); | |
for(ContentDocumentLink cdl:[SELECT ContentDocumentId,ContentDocument.title,ContentDocument.LatestPublishedVersionId FROM ContentDocumentLink where LinkedEntityId =:parentRecordId]){ | |
contentVersionIdList.add(string.valueof(cdl.ContentDocument.LatestPublishedVersionId)); | |
} | |
downloadAllFileUrl = downloadAllFileUrl +'/'+string.join(contentVersionIdList,'/'); | |
system.debug('***downloadAllFileUrl:'+downloadAllFileUrl); |
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
//purpose- remove special characters from file names when uploaded in salesforce | |
trigger SK_ContentVersionTrigger on ContentVersion (before insert) { | |
for(ContentVersion cv: trigger.new){ | |
if(string.isNotBlank(cv.Title)){ | |
cv.Title= cv.Title.replaceAll('[^-a-zA-Z0-9\\s+]', ''); | |
System.debug('***updated Title '+cv.Title); | |
} | |
} | |
} |
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 SK_ToolingAPIFieldsUtility { | |
@AuraEnabled | |
public static DM_FieldWrapper findAllFields(string selOrgNCName,string objAPIName,string NamespacePrefix){ | |
DM_FieldWrapper returnValue= new DM_FieldWrapper(); | |
string URIForFields='/services/data/v54.0/tooling/query/?q=Select+id,Datatype,ReferenceTo,ExtraTypeInfo,IsCalculated,IsCompound,IsIndexed,ValueTypeId,RelationshipName,NamespacePrefix,Label,IsNameField,QualifiedApiName,developerName+from+FieldDefinition+'; | |
URIForFields=URIForFields + 'where+EntityDefinition.QualifiedApiName=\''+objAPIName+'\'+AND+IsCalculated=false+'; | |
URIForFields=URIForFields + '+AND+DataType!=\'Auto+Number\''; | |
string endpointURL='callout:'+selOrgNCName+URIForFields; |
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 SK_ToolingAPIUtility { | |
@AuraEnabled | |
public static List<checkboxGroupValuesWrapper> findAllObjects(string selOrgNCName,string namespacePrefix,string objName){ | |
system.debug('****selOrgNCName:'+selOrgNCName); | |
system.debug('****NamespacePrefix:'+namespacePrefix); | |
system.debug('****objName:'+objName); | |
List<checkboxGroupValuesWrapper> returnList=new List<checkboxGroupValuesWrapper>(); | |
try { |
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
<template> | |
<h1>Click below buttons to get URL for resources</h1> | |
<lightning-button label="SFDCSTUFF BLOGS" onclick={sendMessageToParentCmp}></lightning-button> | |
<lightning-button label="TRAILHEAD" onclick={sendMessageToParentCmp}></lightning-button> | |
</template> |
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
<template> | |
<div> | |
<lightning-card title="Account Hierarcy"> | |
<lightning-tree-grid | |
columns={gridColumns} | |
data={gridData} | |
key-field="Id" | |
hide-checkbox-column="true" | |
expanded-rows={currentExpandedRows}> | |
</lightning-tree-grid> |
NewerOlder