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
/** | |
* @File Name : CreateMissingContactUserLinkController.cls | |
* @Description : | |
* @Author : | |
* @Group : | |
* @Last Modified By : | |
* @Last Modified On : 2020-01-29 15:32:43 | |
* @Modification Log : | |
* Ver Date Author Modification | |
* 1.0 2020-01-29 Srujan Initial Version |
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 static List <String> getselectOptions(sObject objObject, string fld) { | |
system.debug('objObject --->' + objObject); | |
system.debug('fld --->' + fld); | |
List < String > allOpts = new list < String > (); | |
// Get the object type of the SObject. | |
Schema.sObjectType objType = objObject.getSObjectType(); | |
// Describe the SObject using its object type. | |
Schema.DescribeSObjectResult objDescribe = objType.getDescribe(); | |
// Get a map of fields for the SObject | |
map < String, Schema.SObjectField > fieldMap = objDescribe.fields.getMap(); |
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 static string renderEmailTemp(Id objctId, List<String> bodies){ | |
// Id of the sObject, list of Email template bodies | |
List<Messaging.RenderEmailTemplateBodyResult> renderEmailTemplateBodyRes= Messaging.renderEmailTemplate(null,objctId, bodies); | |
return renderEmailTemplateBodyRes[0].getMergedBody(); | |
} |
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
global class AccountUpdateBatchJob implements Database.Batchable<sObject> | |
{ | |
global Database.QueryLocator start(Database.BatchableContext BC) | |
{ | |
String query = 'SELECT Id,Name FROM Account'; | |
return Database.getQueryLocator(query); | |
} | |
global void execute(Database.BatchableContext BC, List<Account> scope) | |
{ |
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
PageReference pg = Page.EHSC_OSB_PDF; | |
pg.getParameters().put('id', oppId); | |
ContentVersion conVer = new ContentVersion(); | |
conVer.ContentLocation = 'S'; // S specify this document is in SF, use E for external files | |
conVer.PathOnClient = 'OSB '+DateTime.now().getTime()+'.pdf'; // The files name, extension is very important here which will help the file in preview. | |
conVer.Title = 'OSB '+DateTime.now().getTime()+'.pdf'; // Display name of the files | |
if(!Test.isRunningTest()){ | |
conVer.VersionData = pg.getContentAsPDF(); | |
} | |
else{ |
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
var page1ReqFields = ['lastName','firstName','prefix','birthDate','gender','homePhnNum','pmAddres','pmCity','pmState','pmZip']; | |
// aura Ids of required fields |
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
<apex:page showHeader="false" renderAs="PDF" cache="true" > | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | |
<style type="text/css"> | |
@page{ | |
size:A4 portrait; | |
@bottom-right { | |
content: "Page " counter(page) " - " counter(pages); | |
font-family: 'Arial', 'Helvetica', sans-serif; |
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
<div class="slds-truncate" style ="text-align : center;" title="{!$Label.c.Selection}" data-selected-Index = "{!com.key}" onclick ="{!c.setKey}"> | |
<lightning:input aura:id="selectedRange" name="radioButton" type="radio"/> | |
</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
public class EmailLogic { | |
public static String renderTemplate(sObject sobj, String template) { | |
for (String fieldName : fields(sobj.getSObjectType())) { | |
String key = '{!' + fieldName + '}'; | |
while (template.containsIgnoreCase(key)) { | |
try { | |
Integer foundPosition = template.indexOfIgnoreCase(key, 0); | |
template = template.left(foundPosition) + | |
String.valueOf(sobj.get(fieldName)) + |
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
@font-face { | |
font-family: myFont; | |
src: url({!URLFOR($Resource.MyZipFile, '/root/to/font.ttf')}); | |
} | |
p { | |
font-family: myFont; | |
} | |
//You could put them in a .zip folder, upload them as a static resource and use @font-face to call them in your CSS. |