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
| #!/bin/bash | |
| echo "Please enter alias of the environment that you want to deploy to" | |
| read aliasInput | |
| rm -rf mdapipackage | |
| sfdx force:source:convert -d ./mdapipackage | |
| sfdx force:mdapi:deploy -w 100 -d ./mdapipackage -u $aliasInput | |
| cmd /k #this keeps the window open after execution so that we can read errors |
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 with sharing class RecordTypeUtilWithCache { | |
| private static Map<String, Schema.SObjectType> sObjectTypeMap = Schema.getGlobalDescribe(); | |
| private static Map<String, Map<String, Schema.RecordTypeInfo>> soTypeToRecordTypesMap = new Map<String, Map<String, Schema.RecordTypeInfo>>(); | |
| public static Id getRecordTypeId(String objectName, String recordtypeName) { | |
| Schema.SObjectType sotype = sObjectTypeMap.get(objectName); | |
| Map<String, Schema.RecordTypeInfo> recordTypeMap = soTypeToRecordTypesMap.get(objectName); | |
| if(recordTypeMap == null) { | |
| recordTypeMap = sotype.getDescribe().getRecordTypeInfosByName(); | |
| } |
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 with sharing class RecordTypeUtil { | |
| //Do not use this | |
| public static Id getRecordTypeIdWithoutCache(String objectName, String recordtypeName) { | |
| Map<String, Schema.SObjectType> sObjectTypeMap = Schema.getGlobalDescribe(); | |
| Schema.SObjectType sotype = sObjectTypeMap.get(objectName); | |
| Map<String, Schema.RecordTypeInfo> recordTypeMap = sotype.getDescribe().getRecordTypeInfosByName(); | |
| return recordTypeMap.get(recordTypeName).getRecordTypeId(); | |
| } | |
| } |
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 EmailUtility{ | |
| //Simple code to send email to a number of email addresses | |
| public static void sendSimpleEmail(List<String> recipientList, String subject, String emailBody){ | |
| Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); | |
| email.setToAddresses(recipientList); | |
| email.setSubject(subject); | |
| email.setPlainTextBody(emailBody); | |
| email.setHtmlBody(emailBody); | |
| Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email}); | |
| } |
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 class="parent"> | |
| <c-lwc-component-a></c-lwc-component-a> | |
| <c-lwc-component-b></c-lwc-component-b> | |
| </div> | |
| </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
| .red-border { | |
| border: 3px solid red; | |
| padding: 50px; | |
| width: 250px; | |
| height: 250px; | |
| float:left; | |
| margin-left: 10px; | |
| } |
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
| .green-border { | |
| border: 3px solid green; | |
| padding: 50px; | |
| width: 250px; | |
| height: 250px; | |
| float:left; | |
| } |
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
| .child-container { | |
| border: 3px solid red; | |
| margin:50px 10px; | |
| padding: 0 20px; | |
| } |
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
| .parent { | |
| border: 3px solid green; | |
| padding: 50px; | |
| } |
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> | |
| <!-- Notice that the uppercase characters in child component name needs to be replaced with - character --> | |
| <c-child-l-w-c-component child-variable="Value sent from Parent"></c-child-l-w-c-component> | |
| <c-child-l-w-c-component child-variable={dynamicVariable}></c-child-l-w-c-component> | |
| </template> |