Process Builder & InvocableMethod- Alternative to send Visualforce as an email attachment from Apex Trigger
Previously I had written same blog post and it was working fine before Winter 16. However, after Winter 16 critical update was released by Salesforce to consider getContent() method as a callout. If this update is enabled in your Salesforce instance then my previous blog post will not work.
In this blog post, we will go through alternate design, where we would still be able to send Visualforce page content as an Email attachment. Difference is, instead of Apex Trigger , Invocable Method and Process builder will help us getting there.
Again, consider below simple Visualforce page, which we want to send as an attachment.
While implementing real Continuous integration in Salesforce, we need to perform various adjustments in metadata before deploying it to build server or production instance, many automated scripts (automation) are needed. If you need to change ANT scripts or metadata frequently, then it means continuous integration or deployment process in your Salesforce project is not yet fully matured.
Lightning Component will contain only declaration of checkbox as shown below.
While building Lightning Components in Salesforce, how to effectively use Google chrome developer tools to troubleshoot and analyze issue
Web based applications are dominating the software industry and various frameworks like Angular 2, React, polymer and Lightning are on rise. From movie Spider man, this dialogue stands very true – With great power comes great responsibility.
As a web developer, its our job to make sure the application implemented by us, stands on performance benchmark and at the same time development time is reduced. To achieve this, fast and effective troubleshooting of web application becomes integral part of project development. One of the best tool to troubleshoot web applications are available freely – Google chrome developer tools.
In this blog post, we will uncover lots of tips and tricks about using chrome developer tools.
we will start with console API of chrome developer tool first.
console.error('Google chrome dev tools - error');
console.warn('Google chrome dev tools - warn');
console.info('Google chrome dev tools - info');
console.debug('Google chrome dev tools - debug');
console.log('Google chrome dev tools - log');
Below is output, how its displayed in chrome
As shown in above image, different log levels of console method printed in different color. error log level even prints complete stack trace of methods showing origin of error.
Summer 16 is already in production and most of you already knows what’s there in pandora box. In this post, I will share my favorite 20 features of Summer 16 release.
1. Clone Sandbox (Pilot) : This feature is not yet generally available however worth mentioning. Till now, we could create Sandbox only from production, however Summer 16 gives us a way to create brand new sandbox from other existing sandbox instead of production.
2. New Trace Flags in Debug Log : Now we can add trace flags on Automated Process, User, Apex Trigger and Apex classes as well. Before this release, we could only add trace flag on user. This enhancement will give developers more control over what to display in debug log and overcome debug log size limit problems.
Video tutorial explaining basics of Service cloud console and configuring important features
Many times I struggle to remember how to configure some components in Service cloud because, there are many features which has been disabled. Many new feature needs some extra configuration to enable it. For example, like to enable Knowledge One, we need to disable traditional article component
This video explains some of basics of configuring Service cloud console in Salesforce.
Below are topics covered in this video :
Setting up Highlight Panel
Enabling Knowledge One component and auto search article on basis of Subject entered
Video tutorial explaining how we can use Lightning CLI to identify possible issues and enhancements needed for Lightning Component and enabling it for Locker Service
Lessons learned while fixing error in Batch Apex , First error: Apex CPU time limit exceeded
In this post, I would share my recent experience in fixing “CPU time limit” error in Batch apex and reason. When I encountered this error, initially thought that it would be easy to fix by following some of basic rules like :
Remove unnecessary code and loops
Efficient use of collections (Set, Hashmap or List)
Avoid using loop within loop
SOQL query should be indexable
Avoid unnecessary re-initialization of variables
Use Aggregated SOQL (as Database operations not counted in this limit, avoid arithmetic operations in Apex)
Check how much time Workflow rules and process builders are taking
Is there any manage package performing heavy operations in transaction
This piece of code was handed over to me from previous team, so I was not fully aware about full functionality and thought to check debug logs. To my surprise, how many times I tried to get a log, every attempt failed. I was thinking that problem could be in execute method however Batch Apex was failing with no debug logs. I tried all my tricks to get debug log with no success. Batch Apex was using Query locator and it could fetch up to 50 millions of record and therefore overlooked start method. Continue reading “Batch Apex – First error: Apex CPU time limit exceeded”
Summer 16 release of Salesforce brings festival of lights not only in its logo but to Process builder as well
Before going to this feature, lets try to outline problem first. Consider a situation where we need to create a task when lead source is Email and send an email to owner if lead source is Email and company name as ABC.
If we try to solve it using process builder, very soon we will understand that it is not possible in one process builder. Process builder can have only one criteria with true and false condition. In previous process builder, we could either perform action if lead source is Email or lead source is Email and company ABC. There is no way to define new criteria which will run along with previous criteria as shown in below image.
Step by step guide to know about Omni Channel and how does it makes Call Centre Queue Manager’s life easier in Salesforce Service Cloud
We can route case or lead records to Queue on basis of assignment rules. Queue can also be set as an owner for custom object records. However, once record is assigned to queue, it needs manual intervention to assign it further to members in queue or queue member can assign to themselves. Queue members assigning to themselves, however may result into cherry picking. Some agents may resolve easier cases and some of them only gets time consuming or hard cases.
Omni-Channel offering from Service cloud is promising product and resolves this problem to some extend. It can automatically route records to agents in queue on basis of incoming case complexity and work load of agents.