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
| Opportunity opty = new Opportunity(Id = '006i000000A0T3t'); | |
| Grant_Management__c grd = new Grant_Management__c(Name = 'Test 123'); | |
| insert grd; | |
| ConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput(); | |
| ConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput(); | |
| ConnectApi.TextSegmentInput textSegment; | |
| ConnectApi.LinkSegmentInput linkSegment; | |
| messageInput.messageSegments = new List<ConnectApi.MessageSegmentInput>(); |
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
| This worked for me: | |
| Map<String, String> params = new Map<String, String> (); | |
| TwilioRestClient client = TwilioAPI.getDefaultClient(); | |
| TwilioMessageList als = new TwilioMessageList(client, params); | |
| als.setRequestAccountSid('XXX'); //put Accound Sid here | |
| for (TwilioMessage msg: als.getPageData()) { | |
| system.debug('###' + msg.getProperty('body')); | |
| } |
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
| @isTest | |
| private class ContactAssociateAccount_TEST { | |
| @isTest | |
| private static void testblankaccountid() { | |
| //First test when no Account exists | |
| Contact testc = new Contact (LastName = 'Test Contact 1'); | |
| insert testc; |
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
| html += '<tr><td><button class="slds-button slds-button--icon-bare removeKWRow"><svg aria-hidden="true" class="slds-button__icon slds-button__icon--large">'; | |
| html += '<use xlink:href="{!URLFOR($Resource.SLDS090,'/assets/icons/utility-sprite/svg/symbols.svg#close')}"></use>'; | |
| html +='<span class="slds-assistive-text">close</span></button></td>'; | |
| html += '<td>' + value.AccountName + '</td>'; | |
| html += '<td class="hiderow">' + value.AccountId + '</td>'; | |
| html += '<td class="hiderow">' + value.KnowWhoId + '</td>'; | |
| html += '<td>'; |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
| <log4j:configuration> | |
| <appender name="fileAppender" class="org.apache.log4j.RollingFileAppender"> | |
| <param name="File" value="${java.io.tmpdir}/sdl.log" /> | |
| <param name="Append" value="true" /> | |
| <param name="MaxFileSize" value="100KB" /> | |
| <param name="MaxBackupIndex" value="1" /> | |
| <layout class="org.apache.log4j.PatternLayout"> | |
| <param name="ConversionPattern" |
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<ApexClass> ac = [select Id, name, body from ApexClass where NamespacePrefix = NULL ]; | |
| integer i = 0; | |
| for (ApexClass actemp: ac) { | |
| if (actemp.body.contains( '@isTest') ) { | |
| i++; | |
| } | |
| } | |
| system.debug(i + ' classes are Tests'); |
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 Employee_Demo on Employee__c (after insert, after update) { | |
| //Create a map of the leaves for each Gender/Status Combo. Consider a setting for this | |
| Map<String, List<String> > LeaveTypeMap = new Map<String, List<String> > (); | |
| LeaveTypeMap.put('Female:Full Time', new List<String>{'Maternity Leave','Annual Leave','Personal Leave','Unpaid Leave'}); | |
| LeaveTypeMap.put('Male:Full Time', new List<String>{'Paternity Leave','Annual Leave','Personal Leave','Unpaid Leave'}); | |
| LeaveTypeMap.put('Female:Part Time', new List<String>{'Unpaid Leave'}); | |
| LeaveTypeMap.put('Male:Part Time', new List<String>{'Unpaid Leave'}); | |
| //Create list to hold new leave records | |
| List<Leave__c> LeavestoCreate = new List<Leave__c> (); | |
| //Is this an insert? If so, just create records |
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
| //Assume Asset object has name, lookup to user and picklist called Category | |
| //Store results in a map | |
| Map <String, List<String> > assetmap = new Map <String, List<String> >(); | |
| //Loop through assets | |
| for (Asset__c tempasset : [Select Name, Category__c FROM Asset__c WHERE User__c = '0053000000AD9YT'] ) { | |
| List<String> tempassetlist; | |
| //if map already contains category, add to existing list | |
| If (assetmap.containskey(tempasset.Category__c) ){ | |
| tempassetlist = assetmap.get(tempasset.Category__c); | |
| } |
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
| //Instantiate Contact and include KW Fields on object | |
| Contact c = new Contact(); | |
| //Set Address | |
| c.MailingStreet = '4205 Cordobes Cv'; | |
| c.MailingCity = 'San Diego'; | |
| c.MailingState = 'CA'; | |
| c.MailingPostalCode = '92130'; | |
| //KW Fields (populate if already processed contact) | |
| c.kwzd__KW_Error_Code__c = ''; | |
| c.kwzd__Latitude__c = NULL; |
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 standardController="Opportunity" > | |
| <apex:outputPanel> | |
| <apex:outputText>Thanks!</apex:outputText> | |
| <br/> | |
| <apex:outputField value="{!opportunity.Amount}"/> <br/> | |
| <apex:outputField value="{!opportunity.CloseDate}"/> <br/><br/> | |
| <apex:outputLabel>Household</apex:outputLabel><br/> | |
| <apex:outputField value="{!opportunity.Account.Name}"/><br/> | |
| <br/> |
OlderNewer