Skip to main content

Posts

Showing posts from January, 2017

Sneak Peek: Visualforce with Javascript Promises

While working with Visualforce pages along with javascript remoting functionalities, we often create a lot of callback methods. On top of it, multiple invocations in a chained approach is more chaotic, often hardcoded and leaves code quite unreadable.   Following is an example code while using Javascript remoting within Visualforce page:-   function invoke_remoteService1 (){ console .log ( ' Invoking remote service 1' ); Visualforce.remoting.Manager.invokeAction( '{!$RemoteAction.testWebServiceController.remoteService1}' , remoteService1_ResponseHandler); } function remoteService1_ResponseHandler (response, event){ console .log ( ' Response from remote service 1 = ' + response); if (response ! = null ){ console .log ( ' Invoking remote service 2' ); Visualforce.remoting.Manager.invokeAction( '{!$RemoteAction.testWebServiceController.remoteService2}&

Quick Tips: All about sending emails from Salesforce (with advanced features)

Emails are still a very essential part of our day to day communication. Be it an internal communication within the organization, or across organizations or between customers and organization, emails are one of the key communication mechanism (let's not debate on pros and cons here). Quite obviously, Salesforce provides various options to send emails to internal and external recipients. In this post I'm trying to cover all the essential points (briefly) involved in sending emails from Salesforce. Defining Email Templates First and most important aspect regarding emails is ability to create email templates within Salesforce. This is without doubt one of the most used aspect related to sending emails. Email templates help administrator create pre-defined email templates within Salesforce. This helps in providing business approved and verified templates to system and users. As a result, all outgoing communications are consistent. Also, any correction/ improvement incorporated