Posts

Finally passed Developer I/II transition exam

Ever since I registered for tranistion exam in August, I kept on postponing the exam till today. Finally, I passed the exam today. Happy to share my knowledge on the exam. Just simply follow the below topics mentioned in study guide to crack the exam: Describe the capabilities of base-system objects such as sharing objects, history objects, metadata objects, multi-currency, and Chatter objects. Describe the different capabilities of and use cases for the various Salesforce development platforms (Heroku, Fuel, Force.com). Describe how to design code that accommodates multi-language, multi-currency, multi-locale considerations. Describe the implications of compound data types in Apex programming. Describe the interactions between Visualforce/Apex with Flow/Lightning Process Builder. Given a scenario, describe when and how to use Apex managed sharing. Describe the use cases for the various authentication techniques. Given a set of requirements, describe the process for designing...

New acquistion by Salesforce, PredictionIO, for building Salesforce IQ

Salesforce has made another acquisition to build out its technology in machine learning and big data analytics: the company has acquired PredictionIO, a startup based out of Palo Alto that had developed an open source-based machine learning server. Read this article by TechCrunch for furthur information: http://techcrunch.com/2016/02/19/salesforce-acquires-predictionio-to-build-up-its-machine-learning-muscle/

My insights on Date And Datetime fields

I would like to share my recent experience with Date fields and timezone. Scenario 1: Created a date field 'CustomDate__c'. I configured a validation rule which says , CustomDate__c > Today() Problem: There are different users from different timezones, who can update the record. So, when two users from different timezones say PST(UTC-8), SGT(UTC+8) try to update this record, assuming that Today is Feb 8 2016 according to SGT, SGT User updates 'CustomDate__c' to Feb 8 2016. Validation rule won't fire this time. Now, when PST user tries to update another field on the same record, this user encounters validation error as Today according to this user is Feb 7th 2016. Scenario 2: I had two date fields 'Submission Date' & 'Approved / Rejected Date' on an object. These fields get updated whenever record is submitted for approval & when record is approved/rejected using Field updates in Approval process. Field Updates are con...

How to log mails being sent from Salesforce?

This post helps you learn how to log outgoing e-mails sent from Salesforce. E-mails can be sent through two ways: Workflow e- mail alerts. Mails stent from Apex ( Using single e-mail or Mass e- mail) Mails sent from Apex can be logged easily by creating a custom object and inserting records into it, whenever an e- mail is sent. How to log the e- mails sent through workflow rules? Here comes to the rescue  E-mail services .  With the help of Email services, you can create an email service address and give this address in   Additional Addresses section while configuring the workflow e- mail alert. You can write the logic for inserting/logging the e- mail into the custom object in the Inbound handler.

Customise standard validation error messages in approval process submission

Image
When a record is submitted for approval from items to approve section/ or through a custom button from visualforce page, if there are any validation errors, Salesforce redirects the user to a new page as shown in below screenshot: You can customise the error message in trigger using addError() method.   Account acctObj = Trigger.new[0]; String errorMessage = 'Click here to go to Account, <a href="https://www.blogger.com/'+URL.getSalesforceBaseUrl().toExternalForm()+'/'+acctObj.Id+'">here</a>'; acctObj.addError('<b><span style="color: red;">'+errorBody+'</span></b>');

Export Salesforce standard Report in Visualforce page

Many of us might be developing some custom code to export data to excel. You can use this simple hack to generate excel from Salesforce standard report. String reportDeveloperName = 'Sample_Report'; reports = new List ([select developername,id from report where developername= :reportDeveloperName]); mailLogReportUrl = URL.getSalesforceBaseUrl().toExternalForm() + '/' + reports[0].id + '?pv0=' + pv0 + '&export=1&enc=UTF-8&xf=xls';