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
| ({ | |
| itemsChange : function(component, event, helper) { | |
| var appEvent = $A.get("e.selfService:caseCreateFieldChange"); | |
| appEvent.setParams({ | |
| "modifiedField": event.getSource().get("v.fieldName"), | |
| "modifiedFieldValue": event.getSource().get("v.value") | |
| }); | |
| appEvent.fire(); | |
| }) |
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
| <form name="formcontact33" id="formcontact33" action="https://go.weldtechtraining.com/l/705123/2019-05-09/2nt3" method="POST"> | |
| <div id="thanks" style="display:none;" class="thanku-div"> | |
| <p id="thanku">Your form is succsessfully submited. Thanks!!! </p> | |
| </div> | |
| <div id="thanks1" style="display:none;" class="thanku-div"> | |
| <p id="thanku">Oops!!!! Your form is Not submited. </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
| global class InvocableMethodcls { | |
| /*An invocable variable used as input or output variables in the process builder*/ | |
| global class ActionRequest { | |
| @InvocableVariable(required = true) | |
| public ID leadId; | |
| @InvocableVariable | |
| public String phone; |
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
| list < sObject > sObjList = new list < sObject > (); //This routine would get the rows to update/insert from some business logic | |
| sObjList = myClass.getObjectRowsToUpdate(); | |
| set < string > newExtIDSet = new set < string > (); | |
| string myExternalIDField = 'myExternalID__c'; //Loop through and build a set of External IDs that should be used for a query | |
| for (sObject sObjItem: sObjList) { | |
| tempStr = string.ValueOf(sObjItem.get(myExternalIDField)); | |
| if (string.isBlank(tempStr) == false) { | |
| newExtIDSet.add(tempStr); | |
| } |
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 SupportTicketEmailService implements Messaging.InboundEmailHandler { | |
| global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email,Messaging.InboundEnvelope envelop){ | |
| Messaging.InboundEmailResult result = new Messaging.InboundEmailResult(); | |
| //Instantiate email variables | |
| String fromName = email.fromName; | |
| String emailBody = email.plainTextBody; | |
| String subject = email.Subject; | |
| String fromAddress = email.fromAddress; |
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
| /* | |
| * Trigger Name : AutoCaseSharing | |
| * Author : Hamza @ CloudJunction | |
| * Date Creation : 10/15/2018 01:29 GMT+5 | |
| * Last Date Modified : 10/15/2018 02:31 GMT+5 |
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
| /* Method to get input field value */ | |
| getinputval() { | |
| let returnvalue; //assigning temp variable | |
| var inputCmp = this.template.querySelector(".inputfield"); //getting element | |
| var value = inputCmp.value; //assigning value to variable | |
| // is input valid text? | |
| if (value === "") { | |
| //adding custom validation | |
| inputCmp.setCustomValidity("Field is Required!"); | |
| returnvalue = false; |
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
| // Canadian SIN Checksum Checker | |
| // Source: https://stackoverflow.com/questions/4263398/how-do-i-check-the-validity-of-the-canadian-social-insurance-number-in-c | |
| @AuraEnabled(cacheable=true) | |
| public static boolean IsCanadianSIN(string sSIN){ | |
| Integer iChecksum = 0; | |
| Integer iDigit = 0; | |
| // Checking if number is not starting with 9 | |
| if(!sSIN.startsWith('9')){ |
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
| @RestResource(urlMapping='/DLResult') | |
| global without sharing class DL_Info_Receiver { | |
| @HttpGet | |
| global static void doGet() { | |
| RestContext.response.addHeader('Content-Type', 'text/plain'); | |
| String code = RestContext.request.params.get('rc'); | |
| String CustomerId = RestContext.request.params.get('customerid'); | |
| RestContext.response.responseBody = Blob.valueOf('Hello '+CustomerId); | |
| String Message; |
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
| List<sObject> records = new List<sObject>(); | |
| records.add(new Account(AccountExternalId__c='1234555', Name='ABCD Company')); | |
| records.add(new Contact(account=new Account(AccountExternalId__c='1234555'),lastname = 'Testlast', ContactExternalId__c='3525')); | |
| records.add(new AccountContact__c (Contact__r = new Contact(ContactExternalId__c='3525'))); | |
| insert records; |