Category Archives: Development

Nov 04

Simple test class for apex class

public class HelloWorld { public String hello(integer wRet ) { if (wRet >0) { return 'Hello World_1'; } else { return 'Hello World_0'; } } } @isTest(SeeAllData=false) public class HelloWorld_isTest { static testMethod void validateHellow() { HelloWorld hello_world = new HelloWorld(); String result1 = hello_world.hello(2); String result0 = hello_world.hello(0); } }

Posted in Development | Comments Off on Simple test class for apex class
Oct 18

Salesforce1 Platform – Enabling Lightning Components

https://developer.salesforce.com/page/Lightning_FAQ Note: this option is available in Developer ORG as well. https://help.salesforce.com/apex/HTViewHelpDoc?id=aura_bundles_view.htm&language=en_US To enable Lightning components: From Setup, click Develop | Lightning Components. Select the Enable Lightning Components checkbox. Click Save.

Posted in Development | Tagged , | Comments Off on Salesforce1 Platform – Enabling Lightning Components
Sep 05

Triggers and Order of Execution

Loads the original record from the database or initializes the record for an upsert Loads the new record field values from the request and overwrites the old values.Database.com doesn’t perform system validation in this step when the request comes from other sources, … Read More

Posted in Development | Tagged | Comments Off on Triggers and Order of Execution
Aug 15

Clone a record Apex

****************************************** trigger clonProdNonTX on Contract_Addendum__c (before insert) {List<Id> list_prod_ids = new List<Id>(); for(Contract_Addendum__c adden : Trigger.New){ list_prod_ids.add(adden.Product_Request_ID__c); if (adden.Type__c=='Price / Product Conversion'&&adden.Billing_State__c!='TX') { Product__c p = [select Id, IsDeleted, Name, RecordTypeId, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Opportunity__c, Account__c, Adder_per_M_Wh__c, Ancillary_Adder__c, … Read More

Posted in Development | Comments Off on Clone a record Apex
Jul 22

HC example

http://www.marketwatch.com/story/kincare-selects-clicksoftwares-clickworkforce-via-the-salesforce1-appexchange-to-connect-with-customers-in-a-whole-new-way-2014-07-21

Posted in Development, Big Data | Tagged | Comments Off on HC example
Jul 10

Step-by-step guide to becoming a Salesforce developer

Great Stuff! http://www.sfdc99.com/2014/04/28/step-by-step-guide-to-becoming-a-salesforce-developer-this-summer/ Step 1: Sign up for the Official Webinar Series on Learning Apex beginning in early May! Can’t make it to the webinar? Sign up to have the recordings emailed to you! May 15th – Get Started with Apex in 30 Minutes … Read More

Posted in Development | Comments Off on Step-by-step guide to becoming a Salesforce developer
Jul 02

Reserved Keywords

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_reserved_words.htm   Table 1. Reserved Keywords abstract activate* and any* array as asc autonomous* begin* bigdecimal* blob break bulk by byte* case* cast* catch char* class collect* commit const* continue convertcurrency decimal default* delete desc do else end* enum exception … Read More

Posted in Administration, Development | Comments Off on Reserved Keywords