tag:blogger.com,1999:blog-26453124114226872912024-02-07T18:27:26.538-08:00Nepz SalesforceSankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-2645312411422687291.post-27482054193977915522017-05-29T12:11:00.000-07:002017-05-30T06:30:53.558-07:00New Google+ Community Launched - Nepz Solutions !!<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
A new Community ?</h2>
yes, a new community specifically for who's interested in Salesforce in general & more specifically in Apex, Visualforce, Lightning & also in basic web technologies like HTML, CSS & Javascript.<br />
<br />
click here to join - <a href="https://plus.google.com/communities/101595119886078416496">Nepz Solutions - Google+ Community</a><br />
<br />
<h2 style="text-align: left;">
What is it for ?</h2>
I have been blogging & publishing videos for Salesforce Developers for quite sometime. But, it looks like more of a one way communication. So, i thought to create a community where we actively discuss about various development issues & get to know about each other & help each other. Here's the few things i'm expecting to deliver through this community,<br />
<br />
<ul style="text-align: left;">
<li>Tutorials</li>
<li>Share Development Tips & Tricks</li>
<li>Online Events (like coding puzzles, bootcamp, etc)</li>
<li>Weekly Hangouts</li>
<li>Personalized Training (one to one)</li>
</ul>
<br />
<h2 style="text-align: left;">
What is next ?</h2>
As soon as i reach 10 members in the community, i'm going to schedule a launch event & discuss about the community & chit chat with the people to get to know about each other.<br />
<br />
<h2 style="text-align: left;">
In Video ?</h2>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/N2o1QtrKkYo/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/N2o1QtrKkYo?feature=player_embedded" width="500"></iframe></div>
<div>
<br /></div>
</div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com4tag:blogger.com,1999:blog-2645312411422687291.post-38163214503215513162017-02-23T00:48:00.000-08:002017-02-23T06:27:32.080-08:00Visualforce - Beyond Basics Series 50 - Easy Global Search<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
What is Global Search ?</h2>
In Salesforce, there's a standard global search functionality at the top Header. This will search all the text, email, phone fields in Objects & list them.<br />
<h2 style="text-align: left;">
<br />How to implement one ?</h2>
If you want to implement one, it's simple to do so. we need to use SOSL for fuzzy search on fields in specific objects.<br />
<h2 style="text-align: left;">
<br />Where is the Code ?</h2>
<script src="https://gist.github.com/sankaran1984/dd1b908f41bc0727f81823a2daf58a5c.js"></script>
<script src="https://gist.github.com/sankaran1984/d06d0fc79b11f12bd4e2b61896c33055.js"></script>
</div>
<h2 style="text-align: left;">
<br />Any Screenshots ?</h2>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23251274/9a3bdd0c-f9a4-11e6-8d78-3ed6a8e9c0a5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="392" src="https://cloud.githubusercontent.com/assets/4547493/23251274/9a3bdd0c-f9a4-11e6-8d78-3ed6a8e9c0a5.png" width="640" /></a></div>
<br />
<br />
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/2XUJdvX5ELc/0.jpg" src="https://www.youtube.com/embed/2XUJdvX5ELc?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com5tag:blogger.com,1999:blog-2645312411422687291.post-62639106719237007892017-02-23T00:28:00.001-08:002017-02-23T06:27:09.521-08:00Visualforce - Beyond Basics Series 49 - Mark a table column as Required<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
How to give help text for a Table ?</h2>
In visualforce, table can be generated using PageBlockSection, PageBlockTable, DataGrid tags. If one wants to provide help text for a column, they need to use apex:facet tag.<br />
<br />
<h2 style="text-align: left;">
How it will be useful to indicate Required Field ?</h2>
In some cases, developer may want to indicate a column as Required. So, it's possible to provide that in the table column header<br />
<h2 style="text-align: left;">
<br />Where is the Code ?</h2>
<script src="https://gist.github.com/sankaran1984/5346073d4048660548d91caf5566687a.js"></script>
</div>
<br />
<div>
<h2 style="text-align: left;">
Any Screenshots ?</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23250644/ee3d9f10-f9a1-11e6-9e97-9e3f44f1d31d.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="156" src="https://cloud.githubusercontent.com/assets/4547493/23250644/ee3d9f10-f9a1-11e6-9e97-9e3f44f1d31d.png" width="640" /></a></div>
<br /></div>
<h2 style="text-align: left;">
<br />Walk through in a video ?</h2>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/7910mtm7oeo/0.jpg" src="https://www.youtube.com/embed/7910mtm7oeo?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-85681977994052421692017-02-22T22:53:00.002-08:002017-02-23T06:26:43.725-08:00Visualforce - Beyond Basics Series 48 - Required field Help Text<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
How to give more emphasis on Required fields in form ?</h2>
Prevention is better than Cure. Most of the time users forget to fill in required fields in the form & realize than while saving the record.<br />
<h2 style="text-align: left;">
<br />How to prevent that ?</h2>
Giving a highlighted Help text through each section of the forms would give more emphasis on required fields. By doing so, user will fill some values & will never have any issues while saving the record.<br />
<br />
<h2 style="text-align: left;">
Where is the Code ?</h2>
</div>
<script src="https://gist.github.com/sankaran1984/2e7e23ec5c217d0ad32dfacacdad647a.js"></script>
<h2 style="text-align: left;">
<br />Any Screenshots ?</h2>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23247922/aca0064a-f994-11e6-8d0e-56c3be834c39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="148" src="https://cloud.githubusercontent.com/assets/4547493/23247922/aca0064a-f994-11e6-8d0e-56c3be834c39.png" width="640" /></a></div>
<br />
<br />
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/nKXp2zrtekU/0.jpg" src="https://www.youtube.com/embed/nKXp2zrtekU?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com1tag:blogger.com,1999:blog-2645312411422687291.post-45270653339799545692017-02-22T11:36:00.000-08:002017-02-23T06:26:16.857-08:00Visualforce - Beyond Basics Series 47 - Extend standard sObject<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
What is the purpose of extending the sObject ?</h2>
There's no inheritance to standard sObject. So, if one wants to extend the record, one need to create a wrapper to store the record inside it.<br />
<br />
<h2 style="text-align: left;">
How to do that ?</h2>
The wrapper is a Apex Class which will have the record and other extended fields. So, in visualforce page, both standard and extended fields can be used seamlessly.<br />
<h2 style="text-align: left;">
<br />Where is the Code ?</h2>
</div>
<br />
<script src="https://gist.github.com/sankaran1984/2c785cfc917fa05ede23b3504e450d92.js"></script>
<script src="https://gist.github.com/sankaran1984/2bd85fc417291f3d360337b28a0fb0b3.js"></script>
<br />
<div>
<h2 style="text-align: left;">
Any Screenshots ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23228816/d7e5eeb4-f935-11e6-8efd-8bc4611fc9b6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="416" src="https://cloud.githubusercontent.com/assets/4547493/23228816/d7e5eeb4-f935-11e6-8efd-8bc4611fc9b6.png" width="640" /></a></div>
<br />
<br />
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/FiKZI3Jx9eI/0.jpg" src="https://www.youtube.com/embed/FiKZI3Jx9eI?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com1tag:blogger.com,1999:blog-2645312411422687291.post-76618811292283365982017-02-22T10:47:00.000-08:002017-02-23T06:25:51.605-08:00Visualforce - Beyond Basics Series 46 - Treat each User differently<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
What is Personalization ?</h2>
Sometimes Visualforce page needs to behave or look differently for different set of users. This is called Personalization.<br />
<br />
<h2>
How do achieve this ?</h2>
In salesforce, we can use 'Custom Settings' to store the personalization data for User, Profile or entire Organization. We need to be very careful in not misusing this. If any data that does n't different between user, then it's App Configuration which should be stored in 'Custom Metadata'.<br />
<br />
<h2 style="text-align: left;">
Where is the Code ?</h2>
<script src="https://gist.github.com/sankaran1984/601bf611bb69d9b694d9b9f2b343fa29.js"></script>
</div>
<h2 style="text-align: left;">
<br />Any Screenshots ?</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23226842/f99ac31a-f92e-11e6-8d7e-9a2c744b4fda.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://cloud.githubusercontent.com/assets/4547493/23226842/f99ac31a-f92e-11e6-8d7e-9a2c744b4fda.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/uJoJ2J8Rln0/0.jpg" src="https://www.youtube.com/embed/uJoJ2J8Rln0?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-33917458041093438932017-02-22T10:20:00.002-08:002017-02-23T06:25:26.674-08:00Visualforce - Beyond Basics Series 45 - Keep the pages alive<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
What is keep-alive for the page ?</h2>
For every visualforce page, there's a timout for session, after which the session expires. This is configurable under security controls in Salesforce Setup. Normally, it will be few minutes in best secured Org.<br />
<h2 style="text-align: left;">
<br />How to prevent that ?</h2>
But, practically, you might have a visualforce page which requires more time for the User to work on it. Say, if they take 30min to configure products for an opportunity, then, they were pulled for a meeting. So, when they come back after 30 min & click save, they should be disappointed to see login page & potentially losing all the effors.<br />
<br />
To avoid such scenarios, we can use actionPollar to poll for an empty request to server, so that session will be kept alive forever.<br />
<br />
<h2 style="text-align: left;">
Where is the Code ?</h2>
<script src="https://gist.github.com/sankaran1984/ab8a4f3c190c42a14816a910d8682eb4.js"></script>
</div>
<br />
<div>
<h2 style="text-align: left;">
Any Screenshots ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23225879/706b1b38-f92b-11e6-98f8-b43cea41dfce.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://cloud.githubusercontent.com/assets/4547493/23225879/706b1b38-f92b-11e6-98f8-b43cea41dfce.png" /></a></div>
<br />
<br />
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/e1LFYQIWroc/0.jpg" src="https://www.youtube.com/embed/e1LFYQIWroc?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-49813465817122186332017-02-22T10:01:00.000-08:002017-02-23T06:24:51.854-08:00Visualforce - Beyond Basics Series 44 - Inline VF Page Redirect<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
What is Inline VF Page ?</h2>
Inline Visualforce page means, a technique of embedding visualforce page into the main detail/edit page of standard layout for a record.<br />
<br />
<h2 style="text-align: left;">
How to redirect or refresh the page ?</h2>
This inline VF Page lives inside a iframe. So, when you do redirect or reload. the detail/edit page won't get affected. you may try this now, if you haven't faced this.<br />
<br />
<h2 style="text-align: left;">
Where is the Code ?</h2>
</div>
<br />
<script src="https://gist.github.com/sankaran1984/31fbbafca3a1abad886592a9308153d7.js"></script>
<br />
<div>
<h2 style="text-align: left;">
Any Screenshots ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23225128/b7df5ee6-f928-11e6-9dae-41320fb4b015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="378" src="https://cloud.githubusercontent.com/assets/4547493/23225128/b7df5ee6-f928-11e6-9dae-41320fb4b015.png" width="640" /></a></div>
<br />
<br />
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/_TnnFNFpuqo/0.jpg" src="https://www.youtube.com/embed/_TnnFNFpuqo?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-24959425187219175552017-02-22T05:07:00.000-08:002017-02-23T06:24:10.471-08:00Visualforce - Beyond Basics Series 43 - Use QR Code in Page<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
What is QR Code ?</h2>
QR Code is the visual representation of text. It has very similar attributes to Bar Code. But, it's more powerful than it.<br />
<br />
<h2 style="text-align: left;">
What are the applications ?</h2>
The main application is to scan the URL, rather than typing in the browser. And embedding Contact details, Product details for the Business.<br />
<br />
<h2 style="text-align: left;">
How it will be useful in CRM System like Salesforce ?</h2>
In Salesforce, we may need to get the QR Code from external system containing lead information (or) Contact Information (or) Cases. In return, we may send QR Code to other systems which accepts the data in QR Code format. Barcode/QR Code has very important role in every business. So, converting the format between QR Code & text is vital for a Organisation.<br />
<h2 style="text-align: left;">
<br />How to implement the feature very quickly ?</h2>
It's not necessary to implement the complex algorithms required for processing QR Codes. As there are services available in the Cloud, we could reuse them.<br />
<br />
<h2 style="text-align: left;">
Where is the Code ?</h2>
<script src="https://gist.github.com/sankaran1984/c34a28fa7d4adce8a87189930ec15caf.js"></script>
</div>
<br />
<div>
<h2 style="text-align: left;">
Any Screenshots ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23212387/67a16a0c-f8fe-11e6-801b-2faa1b77aa57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://cloud.githubusercontent.com/assets/4547493/23212387/67a16a0c-f8fe-11e6-801b-2faa1b77aa57.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23212662/a7de3702-f8ff-11e6-855f-356f3f080961.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="616" src="https://cloud.githubusercontent.com/assets/4547493/23212662/a7de3702-f8ff-11e6-855f-356f3f080961.png" width="640" /></a></div>
<br />
<br />
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/DbfKpGW46AM/0.jpg" src="https://www.youtube.com/embed/DbfKpGW46AM?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com5tag:blogger.com,1999:blog-2645312411422687291.post-24143783644684780432017-02-22T00:21:00.002-08:002017-02-23T06:23:22.830-08:00Visualforce - Beyond Basics Series 42 - Inline Edit with No Apex<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
How normally inlineEdit implemented in Visualforce ?</h2>
The best way to achieve inlineEdit for fields in Visualforce is using mode = 'InlineEdit' in PageBlock tag. This is the best and efficient way to do it. However, there's only one inconvenience, it opens up only one field for editing.<br />
Then, user needs to click on each field to edit. So, what if user wants to edit all the fields in the row ?<br />
<br />
<h2 style="text-align: left;">
How to edit all the fields in the row ?</h2>
When user double clicks a field in the row, then redirect to the same page with a Query Parameter that determines which row should be opened for Editing.<br />
<h2 style="text-align: left;">
<br />Where is the Code ?</h2>
<script src="https://gist.github.com/sankaran1984/c55ff354b4176daa6c2897bc72348bd0.js"></script>
</div>
<br />
<div>
<h2 style="text-align: left;">
Any Screenshots ?</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23202851/ddb53920-f8d7-11e6-97e9-102165b6d456.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="147" src="https://cloud.githubusercontent.com/assets/4547493/23202851/ddb53920-f8d7-11e6-97e9-102165b6d456.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/23202818/c11a6678-f8d7-11e6-9fe7-52e6b326ac5f.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="172" src="https://cloud.githubusercontent.com/assets/4547493/23202818/c11a6678-f8d7-11e6-9fe7-52e6b326ac5f.png" width="640" /></a></div>
</div>
<div>
<h2 style="text-align: left;">
</h2>
<h2 style="text-align: left;">
</h2>
<h2 style="text-align: left;">
</h2>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/jdMcV7Swuws/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/jdMcV7Swuws?feature=player_embedded" width="500"></iframe></div>
<br />
<br />
<br />
<div>
<h2 style="text-align: left;">
</h2>
<h2 style="text-align: left;">
</h2>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<br /></div>
</div>
<h2 style="text-align: left;">
</h2>
</div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com10tag:blogger.com,1999:blog-2645312411422687291.post-80339270209076561882017-01-29T10:35:00.001-08:002017-02-22T00:22:14.967-08:00Salesforce Life Balance<div dir="ltr" style="text-align: left;" trbidi="on">
<iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/zPaTPxpz9Fg" width="480"></iframe><br />
<br />
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com1tag:blogger.com,1999:blog-2645312411422687291.post-11664358764700201922017-01-24T23:20:00.000-08:002017-01-24T23:37:15.963-08:00Visualforce - Beyond Basics Series 41 - Dynamic Forms<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h3 style="text-align: left;">
Issue with Standard Forms in Salesforce ?</h3>
In Standard record Edit Page, there's no way we can hide/show a set of Fields for Users to Fill In. This is the big issue when you have hundreds of fields that gets presented to the User.<br />
<br />
<h3 style="text-align: left;">
How to solve with visualforce Page ?</h3>
In visualforce page, this problem can be solved by showing/hiding different sections based on the 'certain value' in Fields (or) certain User Action.<br />
<br />
<h3 style="text-align: left;">
Where is the Code ?</h3>
<script src="https://gist.github.com/sankaran1984/a34c57978a816a615eaff07ab8ad3d58.js"></script>
</div>
<br />
<div>
<h3 style="text-align: left;">
Any Screenshots ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/22281349/788faf90-e2ce-11e6-9813-242900af1159.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="156" src="https://cloud.githubusercontent.com/assets/4547493/22281349/788faf90-e2ce-11e6-9813-242900af1159.png" width="640" /></a></div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/22281378/92f2eaf0-e2ce-11e6-820c-a7f8a87ad24c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="https://cloud.githubusercontent.com/assets/4547493/22281378/92f2eaf0-e2ce-11e6-820c-a7f8a87ad24c.png" width="640" /></a></div>
<br />
<div>
<h3 style="text-align: left;">
Walk through in a video ?</h3>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/goQDIXzsy3U/0.jpg" src="https://www.youtube.com/embed/goQDIXzsy3U?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-83143656477530797892017-01-15T00:06:00.000-08:002017-01-15T01:37:38.806-08:00Visualforce - Beyond Basics Series 40 - Static Resource is not the only one<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
Where do you normally store resources in Salesforce ?</h2>
As a developer, we know that most of the resources for projects like images(icons, labels, loaders), javascript, css files is <b>Static Resource. </b>But, there are few different areas in salesforce we could leverage.<br />
<h2 style="text-align: left;">
<br />What are the specific purposes for different areas ?</h2>
These are the different areas where you could store resource & use them in your visualforce page.<br />
<br />
<h3 style="text-align: left;">
Static Resource</h3>
Like the name suggests, one should store the resources that is a static one which doesn't change over the course of time. So, all images, css/js files which has a very stable version should be stored in it.<br />
<h4 style="text-align: left;">
<br />Tips :</h4>
<br />
<ol style="text-align: left;">
<li>One tip is that Org should maintain a proper repository for their static resources & avoid duplicates among the resources. For example, i have seen jquery, loader images all over the static resource packages. This is very ineffective management for the storage space allocated for static resource.</li>
<li>Another tip is to not create package per projects. This will lead to contain duplicate resources. Rather than, better maintain static resource per resource like JS, CSS, LOGOS, LOADERS, etc.</li>
</ol>
<br />
<h3 style="text-align: left;">
<br />Notes & Attachments</h3>
If the resource like Text Documents (rtf, msdoc, csv, pdf, css, js, etc), Images (jpeg, png, gif), videos (flv, avi, mp4, etc) are attached to any Standard/Custom objects like Account, Contact, etc, we could leverage that & use those in Visualforce Pages.<br />
<h4 style="text-align: left;">
<br />Example :</h4>
<br />
For example, recently, i have built a visualforce page that displays the product image for an account. I could have uploaded them in static resource. But, its specific to the Account, so i have added them to Notes and Attachments & used them in visualforce.<br />
<h3 style="text-align: left;">
<br />Documents</h3>
This is the storage area one should use when the resource is not associated to any Object. If it's a single file that is slightly large one, could easily fit in this area. One more advantage is that not only developers, admins can also share this space.<br />
<h3 style="text-align: left;">
<br />Chatter Files</h3>
This is the storage area shared between chatter users, admin & developers. But, one should use this space only if the visualforce page is related to chatter functionality. Otherwise, there's no guarentee that this resource will exisit, as any chatter/admin could modify/delete this resource.<br />
<br />
<h3 style="text-align: left;">
Hosted External</h3>
This is the technique of storing the resources outside Salesforce. This is also a efficient method, as there are so many reliable systems out there today for each resources.<br />
Javascript - Google hosted resources, JQuery, Angular, etc<br />
Images - Github, Flickr, etc<br />
CSS - Google hosted resources, Bootstrap, W3.CSS, etc<br />
doc - Google docs, etc<br />
<br />
<h2 style="text-align: left;">
Where is the Code ?</h2>
For illustration, i have shown the images from 'Static Resource', 'Notes and attachments' & Documents.<br />
<br /></div>
<script src="https://gist.github.com/sankaran1984/5d5f8f3880acea2220c6974ac39ce0fe.js"></script>
<br />
<div>
<h2 style="text-align: left;">
Any Screenshots ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21961129/562939ee-daf9-11e6-934f-02d7af2e5743.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://cloud.githubusercontent.com/assets/4547493/21961129/562939ee-daf9-11e6-934f-02d7af2e5743.png" width="408" /></a></div>
<br />
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Q9Pltb4G0Zo/0.jpg" src="https://www.youtube.com/embed/Q9Pltb4G0Zo?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com2tag:blogger.com,1999:blog-2645312411422687291.post-57908223087016245872017-01-11T12:52:00.000-08:002017-01-14T08:45:25.657-08:00Technical Architect - Easy Guide - Series End<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h2 style="text-align: left;">
What is new in Technical Architect Certification ?</h2>
Salesforce decided to split CTA exam into different parts based on different vertical. To be honest, this is a very cool move, as no one can really master everything in Salesforce.<br />
I know few CTA's who worked in only few areas, but still managed to get CTA. This is totally unfair when salesforce claims this is the top level certification they have.<br />
<br />
<ul style="text-align: left;">
<li>Apex & Visualforce Architect</li>
<li>Application Architect</li>
<li>Communities Architect</li>
<li>Identity Architect</li>
<li>Deployment Architect</li>
<li>Integration Architect</li>
<li>Data & Access Architect</li>
<li>Mobile Architect</li>
</ul>
<br />
<br />
<h2 style="text-align: left;">
How it's going to impact us ?</h2>
As a developer/admin, this is going to really affect us, if we are preparing for it over few months/years. If anyone passed Salesforce Multiple Exam before 31 Jan 2017 they can still apply for Technical Review board round. Otherwise, they need to meet the new requirements to appear for<br />
Review board.<br />
<br />
<h2 style="text-align: left;">
Preparation Guide ?</h2>
Salesforce has given a collection of free resources in the form of free ebook. </div>
<div>
<h2 style="text-align: left;">
<span style="font-size: xx-small;"><span style="font-size: x-large; font-weight: normal;">Click here - <a href="https://www.inkling.com/read/architect-academy-salesforce/">Free ebook - Salesorce Technical Architect</a></span></span></h2>
<h2 style="text-align: left;">
<br />What i have decided ?</h2>
Since, i love to Architect, Design & Code myself, i really don't want to just focus on one level of skills. Moreover, if someone want an Architect job from me, they may not expect any development work, So, i really don't want to get to that point. That's why i decided to get architect certification whichever involves more development work like 'Apex & Visualforce Architect', 'Integration Architect','Mobile Architect'<br />
<br />
<h2 style="text-align: left;">
Any idea on career path ?</h2>
I would advice all my blog readers that there are multiple domains & levels of skills required to do any kind of work in salesforce. So, be stick with what you really love to do & get expert in that.<br />
<h2 style="text-align: left;">
<br />No more videos on CTA ?</h2>
So, i have decided to stop contributing to CTA, as it is getting very diverse & I'm going to share what i'm currently working on, like Lightning, Javascript, Apex, etc.<br />
<br /></div>
<div>
<h2 style="text-align: left;">
Walk through in a video ?</h2>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/3hhYihSovhM/0.jpg" src="https://www.youtube.com/embed/3hhYihSovhM?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-35303095593303305352017-01-02T11:19:00.000-08:002017-01-02T11:59:07.460-08:00Visualforce - Beyond Basics Series 39 - Modern Upload Button<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h3 style="text-align: left;">
How to upload an attachment to record ?</h3>
Using apex:inputFile tag, we can upload a file & store that as the attachment to the record. The master record id should be assigned to parentId for the Attachment.<br />
<h3 style="text-align: left;">
<br />What is the traditional way ?</h3>
Traditionally, developers use the same styling of inputFile as it is. That means there will be an upload button for user to select the file & there has to be a commandButton/commandLink to call the action function.<br />
<h3 style="text-align: left;">
<br />How to transform that to modern look ?</h3>
But, in a modern Upload button solution, a Upload label will be <b>styled as a Button</b>. Then, the inputFile tag will be inside the label & hidden from user. So, user will see only Label(Button), not the acutal inputFile.<br />
<br />
<h3 style="text-align: left;">
Where is the Code ?</h3>
<script src="https://gist.github.com/sankaran1984/4c40f177592f29c161f7c61d77615cf3.js"></script>
<script src="https://gist.github.com/sankaran1984/1112d10abfb072ff99f2425363648887.js"></script>
</div>
Here's the code that illustrates the traditional method & more modern method to upload the file.<br />
<br />
<div>
<h3 style="text-align: left;">
Any Screenshots ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21594913/27d781be-d120-11e6-97d3-d3b508449a15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://cloud.githubusercontent.com/assets/4547493/21594913/27d781be-d120-11e6-97d3-d3b508449a15.png" width="640" /></a></div>
<br /></div>
<br />
<div>
<h3 style="text-align: left;">
Walk through in a video ?</h3>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ThdUVRirRU0/0.jpg" src="https://www.youtube.com/embed/ThdUVRirRU0?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-67810212077562079162016-12-28T07:42:00.000-08:002016-12-28T09:03:50.472-08:00Technical Architect - Easy Guide - Series<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h3 style="text-align: left;">
Want to become a Certified Technical Architect (CTA) ?</h3>
I know that many Salesforce Developers & Admins want to pursue their career toward Architect role in Salesforce Platform. Though, they might have some experience, it's quite hard to get CTA. The main reasons are,<br />
<br />
<ol style="text-align: left;">
<li> Wide Knowledge</li>
<li> Many points to remember</li>
<li> Many subjective ideas/decisions</li>
<li> Need of Communications skills</li>
<li> Expensive & Time consuming</li>
<li> Less Community Support</li>
</ol>
</div>
<h3 style="text-align: left;">
How i'm going to address these problem ?</h3>
<h4 style="text-align: left;">
1) Wide Knowledge</h4>
<div style="text-align: left;">
Information are scattered around the web in Salesforce help manual, blogs, videos, webinars etc. I'm going to bring everything in one series of blog posts.<br />
<br /></div>
<h4 style="text-align: left;">
2) Many points to remember</h4>
<div style="text-align: left;">
I'm going to present the information in more interested ways. So, it will be easy to digest & remember.<br />
<br /></div>
<h4 style="text-align: left;">
3) Many subjective ideas/decisions</h4>
<div style="text-align: left;">
The information which has assumptions, considerations, limitations will be highlighted to give more readablity & clarity to the user.<br />
<br /></div>
<h4 style="text-align: left;">
4) Need of Communications skills</h4>
<div style="text-align: left;">
There will be a section to improve communication specifically for Technical Architect role. So, going through them will help anyone master the skills.<br />
<br /></div>
<h4 style="text-align: left;">
5) Expensive & Time consuming</h4>
<div style="text-align: left;">
I can guarentee that i will make sure that time taken by going this course will be the shortest compariing to other methods/resources. When you acheive the CTA is less possible attemtps, you will save a lot of money.<br />
<br /></div>
<h4 style="text-align: left;">
6) Less Community Support</h4>
<div style="text-align: left;">
This basic intention of this blog is to give a collaboration support among CTA & those who want to achieve it.<br />
<br />
<h3 style="text-align: left;">
How to follow this ?</h3>
</div>
<h3 style="text-align: left;">
<div style="font-size: medium; font-weight: normal;">
I'm going to post series of topics in this blog & also in my <a href="https://www.youtube.com/channel/UCr8l-yAphKFtV4FGc3DY2tA" target="_blank">youtube channel</a>. So, either subscribe to <a href="http://nepzforce.blogspot.co.uk/" target="_blank">my blog</a> (or) <a href="https://www.youtube.com/channel/UCr8l-yAphKFtV4FGc3DY2tA" target="_blank">youtube channel</a></div>
<div>
<br /></div>
</h3>
<h3 style="text-align: left;">
<br />Walk through in a video ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/9-Ah4rJWArs/0.jpg" src="https://www.youtube.com/embed/9-Ah4rJWArs?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-18418688289905938382016-12-27T09:13:00.000-08:002016-12-27T10:20:48.597-08:00Visualforce - Beyond Basics Series 38 - Show Custom Popup<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h3 style="text-align: left;">
How to show a popup ?</h3>
A popup dialog will be very useful in cases where an temporary information needs to be shown to the user for either user Input/Output.<br />
<br />
<h3 style="text-align: left;">
How to load a page in popup ?</h3>
There's no standard popup techniques in Visualforce. So, we need to create a custom Popup & load a visualforce page on that using <b>window.open</b> API method.<br />
<h3 style="text-align: left;">
<br />How to interact with popup & parent page ?</h3>
From the popup, its possible to interact with parent page in two ways,<br />
<br />
<ol style="text-align: left;">
<li> By manipulating parent DOM directly.</li>
<li> By triggering events to parent body component</li>
</ol>
<br />
<br />
<h3 style="text-align: left;">
Where is the Code ?</h3>
I have illustrated the custom popup through a parent page where we have a Text Field that will be populated when the user selects the account in the dialog box.<br />
<script src="https://gist.github.com/sankaran1984/0535f45d1b7de0c9cae290016b66d923.js"></script>
<script src="https://gist.github.com/sankaran1984/1ea78c0d2ca2d078a1e3a25a5a12709d.js"></script>
</div>
<h3 style="text-align: left;">
<br />Any Screenshots ?</h3>
<h4 style="text-align: left;">
Parent Page</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21504457/0eb40810-cc57-11e6-9e1d-3873ca546218.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="140" src="https://cloud.githubusercontent.com/assets/4547493/21504457/0eb40810-cc57-11e6-9e1d-3873ca546218.png" width="640" /></a></div>
<br />
<br />
<h4 style="text-align: left;">
Custom Lookup Dialog box</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21504502/66254d98-cc57-11e6-9b48-45da8ccf86e3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://cloud.githubusercontent.com/assets/4547493/21504502/66254d98-cc57-11e6-9b48-45da8ccf86e3.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h4 style="clear: both; text-align: left;">
After user selected,</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21504522/943f3ec8-cc57-11e6-8781-2b74d9539c56.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="144" src="https://cloud.githubusercontent.com/assets/4547493/21504522/943f3ec8-cc57-11e6-8781-2b74d9539c56.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
<div>
<h3 style="text-align: left;">
Walk through in a video ?</h3>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="600" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Gm0J0kJGFOs/0.jpg" src="https://www.youtube.com/embed/Gm0J0kJGFOs?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-83000437253732876692016-12-26T11:51:00.000-08:002016-12-27T10:20:13.167-08:00Visualforce - Beyond Basics Series 37 - Let user know what is happening<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h3 style="text-align: left;">
How much patience user has ?</h3>
In the modern cloud systems, nearly most of the Applications are hosted in cloud, user started having variety of Applications to use for a particular task. So, the user experience is must. User has less patience these days, so we need to develop applications that treat them as their first class citizens.<br />
<h3 style="text-align: left;">
<br />What is the maximum time user can wait ?</h3>
As per standard, the maximum wait time for a response during UI interation is <b>1 sec. </b>Though, it seems very low, it is possible to achieve this standard very easily.<br />
<br />
<h3 style="text-align: left;">
Best practice to enhance user experience ?</h3>
There might be case where we can't respond back to the user within 1 sec slot. In that case, at least we must report the progress to the user in the form of <b>Progress bar, Status Message or even a Loader image.</b><br />
<br />
<h3>
How to achieve that ?</h3>
Most of the time when the processing can't be responded with Progress value in the Screen, Loader image will be used. In visualforce, actionstatus is used for that purpose. It offers two ways of reporting status message,<br />
<br />
<ol style="text-align: left;">
<li> Start & Stop Text Message</li>
<li> Start & Stop component</li>
</ol>
<br />
<h3 style="text-align: left;">
<br />Where is the Code ?</h3>
I have seen many developers using startText & stopText attribute in action status to display the message. But, it's very rare to use the facet tag to provide the start & stop component that will be displayed when the action takes place. So, i have illustrated with an example, where it will show a loader image on Start & shows a success image at the Stop phase.</div>
<script src="https://gist.github.com/sankaran1984/9c53cc755ce437283f730015850bf569.js"></script>
<script src="https://gist.github.com/sankaran1984/7e4f9ebdf65963780088b1e0ff34b12b.js"></script>
<br />
<h3 style="text-align: left;">
<br />Any Screenshots ?</h3>
<div>
<h4 style="text-align: left;">
When the request sent,</h4>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21485851/ccd09a22-cba1-11e6-95a9-e807e82b0051.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="536" src="https://cloud.githubusercontent.com/assets/4547493/21485851/ccd09a22-cba1-11e6-95a9-e807e82b0051.png" width="640" /></a></div>
<h4 style="text-align: left;">
<br />After the response received,</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21485858/fe127fb0-cba1-11e6-9414-6e51710edaf0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="612" src="https://cloud.githubusercontent.com/assets/4547493/21485858/fe127fb0-cba1-11e6-9414-6e51710edaf0.png" width="640" /></a></div>
<br /></div>
<br />
<div>
<h3 style="text-align: left;">
Walk through in a video ?</h3>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="600" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/aTOjR9wzfKQ/0.jpg" src="https://www.youtube.com/embed/aTOjR9wzfKQ?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-53669907780804726922016-12-22T04:38:00.003-08:002016-12-27T10:19:38.121-08:00Visualforce - Beyond Basics Series 36 - Action for Lookup Dialog<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
What is Lookup dialog ?</h3>
All parent relationship field which is of type lookup can be changed using the standard inputField tag on them.<br />
<br />
<h3 style="text-align: left;">
How can we take action after the Lookup ?</h3>
When user selects some value for the parent relationship, we may need to take some action, perhaps a validation (or) confirmation action to the user.<br />
<h3 style="text-align: left;">
<br />Where it will be useful ?</h3>
We could use this for validation purposes or rendering different section of the page based on the value selected, etc.<br />
<h3 style="text-align: left;">
<br />Where is the Code ?</h3>
The code will illustrate how to take action after the lookup value changed & update different section of the page based on the new selected value.<br />
<script src="https://gist.github.com/sankaran1984/09af2108f38c9cf8c5d107fa0892cd99.js"></script>
<script src="https://gist.github.com/sankaran1984/8315bb4f06b619c7634e7c77c4411b24.js"></script>
<br />
<br />
<h3 style="text-align: left;">
Any Screenshots ?</h3>
<h4 style="text-align: left;">
<br />When loaded</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21425831/4e88b02a-c843-11e6-819d-48cacf6a3be6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="194" src="https://cloud.githubusercontent.com/assets/4547493/21425831/4e88b02a-c843-11e6-819d-48cacf6a3be6.png" width="640" /></a></div>
<br />
<h4 style="text-align: left;">
<br />After lookup</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21425815/2e707f2a-c843-11e6-817c-198ed8b29702.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="395" src="https://cloud.githubusercontent.com/assets/4547493/21425815/2e707f2a-c843-11e6-817c-198ed8b29702.png" width="640" /></a></div>
<br />
<h4 style="text-align: left;">
<br />After value changed</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21425847/6b3ada9a-c843-11e6-9b1b-0bdebee97bbf.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="https://cloud.githubusercontent.com/assets/4547493/21425847/6b3ada9a-c843-11e6-9b1b-0bdebee97bbf.png" width="640" /></a></div>
<h3 style="text-align: left;">
<br /><br />Walk through in a video ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="600" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ACzW-zr1leU/0.jpg" src="https://www.youtube.com/embed/ACzW-zr1leU?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div>
<br /></div>
</div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com1tag:blogger.com,1999:blog-2645312411422687291.post-75174729169653940432016-12-22T03:43:00.001-08:002016-12-27T10:19:03.794-08:00Visualforce - Beyond Basics Series 35 - Build own Dialog Box<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
What is dialog box ?</h3>
Dialog box is a container where a message is displayed to the user & they can either Accept or Cancel the message.<br />
<br />
<h3 style="text-align: left;">
Is there a standard dialog box component ?</h3>
There's no standard component to achieve that. so, we need to build a custom one.<br />
<h3 style="text-align: left;">
<br />How normally developers achieve this ?</h3>
Normally developers would use some third party libraries like Jquery, backbone etc to get the dialog box for their use case. But, it's not necessary, as it is very simple to build one & reuse for all your projects.<br />
<br />
<h3 style="text-align: left;">
What is my solution ?</h3>
I build a component to create the dialog box & it can be used by pages when they wish to display a message to the user.<br />
<br />
<h3 style="text-align: left;">
Where is the Code ?</h3>
I have illustrated with a page including the dialogbox component that i have created. Dialogbox component will accept the message to be displayed & Ok/Cancel action that will be executed. And also it accepts the rerender list of ids for each Action. It's possible to do everything that we could do with a dialog box.<br />
<script src="https://gist.github.com/sankaran1984/32f9c73933aebe204ca044561ba003f5.js"></script>
<script src="https://gist.github.com/sankaran1984/cdb300e38723a085e00e78ecdb672ff1.js"></script>
<br />
<br />
<h3 style="text-align: left;">
Any Screenshots ?</h3>
After clicking 'Show Dialogbox'<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21424545/70b50340-c83b-11e6-9d97-d168f0a8c43f.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="158" src="https://cloud.githubusercontent.com/assets/4547493/21424545/70b50340-c83b-11e6-9d97-d168f0a8c43f.png" width="640" /></a></div>
After clicking 'OK' <br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21424569/952b97e8-c83b-11e6-8c01-c6f21c547dc5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="164" src="https://cloud.githubusercontent.com/assets/4547493/21424569/952b97e8-c83b-11e6-8c01-c6f21c547dc5.png" width="640" /></a></div>
<br />
<h3 style="text-align: left;">
<br />Walk through in a video ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="600" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/gxRSIhf8mDE/0.jpg" src="https://www.youtube.com/embed/gxRSIhf8mDE?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div>
<br /></div>
</div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-17164209201160741962016-12-21T13:23:00.003-08:002016-12-27T10:16:57.257-08:00Visualforce - Beyond Basics Series 34 - Build own Alert Box<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
What is alert box ?</h3>
Alert box is a small container which displays user message in blocking mode that means user can't do any other action in the window.<br />
<h3 style="text-align: left;">
<br />Is there any standard way of doing it ?</h3>
As of now, there's no standard component to display the alert box in the page.<br />
<br />
<h3 style="text-align: left;">
How to build a custom one ?</h3>
Traditionally, developers use window.alert function to display the box in the page. This is done different places in the project & it looks very cluttered to go through the code.<br />
<br />
<h3 style="text-align: left;">
What are the alternatives ?</h3>
Some developers like to use some dialog box from javascript libraries like Jquery, Backbone in blocking mode. Though, it will give the necessary functionality, it's an additional overhead in the page.<br />
<br />
<h3 style="text-align: left;">
Where is the code ?</h3>
<script src="https://gist.github.com/sankaran1984/7513824d1af7beeaeea0244be1abe61f.js"></script>
<script src="https://gist.github.com/sankaran1984/54a06712f0ee57566487cd1e827b8557.js"></script>
<br />
<br />
<h3 style="text-align: left;">
Any screenshots ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21406420/71da921c-c7c3-11e6-9d72-b3d5cb433386.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="144" src="https://cloud.githubusercontent.com/assets/4547493/21406420/71da921c-c7c3-11e6-9d72-b3d5cb433386.png" width="640" /></a></div>
<br />
<br />
<h3 style="text-align: left;">
Walk through in a video ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<br /><iframe width="600" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/nzZMzdlckeM/0.jpg" src="https://www.youtube.com/embed/nzZMzdlckeM?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
</div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-56467633440409589692016-12-20T13:55:00.004-08:002016-12-21T08:52:23.022-08:00Visualforce - Beyond Basics Series 33 - Show error for any Input fields<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Is there any standard way for displaying error message for a field ?</h3>
When a controller/extension (Or) Trigger uses addError method in Sobject field, it will be displayed under the field in the Visualforce Page.<br />
<h3 style="text-align: left;">
<br />What about non-sobject field ?</h3>
But, if the input field has binding through a non-sobject variable, then there's no standard way of displaying the error message under the field.<br />
<h3 style="text-align: left;">
<br />How to show them ?</h3>
The error message has to be displayed manually.<br />
<br />
<h3 style="text-align: left;">
Where is the code ?</h3>
I have illustrated by simply adding error message in a map in Controller, Then, in Visualforce page, if there's an error, the error message will be displayed.<br />
<script src="https://gist.github.com/sankaran1984/cb4903cc927627d32834fcc07f6239f4.js"></script>
<script src="https://gist.github.com/sankaran1984/63bc0dbbbcda00216c81974d1e0edde7.js"></script>
<br />
<h3 style="text-align: left;">
<br />Any screenshot ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21369471/fe347e46-c6fe-11e6-9b58-b456d22fddcc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="132" src="https://cloud.githubusercontent.com/assets/4547493/21369471/fe347e46-c6fe-11e6-9b58-b456d22fddcc.png" width="640" /></a></div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
<br />Walk through in video ?</h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/1S2TvJko_Mw/0.jpg" src="https://www.youtube.com/embed/1S2TvJko_Mw?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-30627291120767902812016-12-20T13:14:00.002-08:002016-12-21T08:51:06.432-08:00Visualforce - Beyond Basics Series 32 - How to handle error properly<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
What could go wrong with Visualforce Code ?</h3>
When the visualforce page renders in UI, it goes through different layers of processing,<br />
<br />
<ol style="text-align: left;">
<li> Controller/Extension Object Creation for page</li>
<li> Invoke Action method for Page</li>
<li> Controller Creation for Component</li>
<li> Initialization of Components</li>
<li> Rendering each binding variables</li>
</ol>
In above steps, the error could happen in any step. It could be due to Invalid Data (Or) Improper handling of invalid data (Or) Developer induced error to User.<br />
<h3 style="text-align: left;">
<br />What are the places to take more care ?</h3>
One need to take more care in following cases,<br />
Handling null values - To avoid, initialize all variables in Constructor or at declaration.<br />
Handling mathematical exceptions - To avoid, careful about divide by zero cases<br />
Handling Network exception - To avoid, always try-catch CalloutException<br />
Handling DML exceptions - To avoid, always try-catch DMLException<br />
Handling NoDataFound exception - To avoid, always try catch Soql query section<br />
There are many other possible cases, but i have highlighted common cases above.<br />
<br />
<br />
<h3 style="text-align: left;">
What are the ways to report error ?</h3>
Between controller & visualforce page, there's one way of error communication which is through ApexPages.Message<br />
<br />
<h3 style="text-align: left;">
How to handle them gracefully ?</h3>
Ideally, there should be no unhandled exception. In that case, salesforce will throw the raw error to User without proceeding after the error.<br />
<br />
<h3 style="text-align: left;">
Where can the error be reported in UI ?</h3>
It can be reported in following places in UI,<br />
<br />
<ol style="text-align: left;">
<li> Top section in the page</li>
<li> Above any group of components</li>
<li> Exactly below the component</li>
</ol>
<br />
<br />
<h3 style="text-align: left;">
Where is the Code ?</h3>
I have illustrated on few ways of reporting error in Controller & also ways to display them in visualforce page<br />
<br />
<script src="https://gist.github.com/sankaran1984/78d92cb90f15513b7994b6f432217192.js"></script>
<script src="https://gist.github.com/sankaran1984/c4fe3b23045484527ed92a3fa547d60f.js"></script>
<br />
<h3 style="text-align: left;">
Any Screenshot ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21368131/17843f2c-c6f9-11e6-93c2-6a92ab213447.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="338" src="https://cloud.githubusercontent.com/assets/4547493/21368131/17843f2c-c6f9-11e6-93c2-6a92ab213447.png" width="640" /></a></div>
<br />
<br />
<h3 style="text-align: left;">
Can you walk through in video ?</h3>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/70GvFrzJZ7c/0.jpg" src="https://www.youtube.com/embed/70GvFrzJZ7c?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br /></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-68967804823415810512016-12-20T11:05:00.000-08:002016-12-21T08:50:37.354-08:00Visualforce - Beyond Basics Series 31 - Use Custom Labels for Global reach<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
How is the language support from salesforce ?</h3>
Salesforce support following three model of language support,<br />
<br />
<ol style="text-align: left;">
<li> Platform only support - It translates everything in the platform to your own language.</li>
<li> Setup Object support - It translates the setup related Object names & labels & instructions to your own language.</li>
<li> End User support - It translates only the End user view to your their own language.</li>
</ol>
One's language is determined by the Language setting in 'Language & Time Zone' under your profile<br />
<h3 style="text-align: left;">
<br />What is Custom Label ?</h3>
The translation bench is a place where you give a map of label with different values in different languages. Its nice simple concept. But, it's very powerful. It works well with even managed packages. It gives power to Admin to edit them when they want to.<br />
<br />
<h3 style="text-align: left;">
How it works ?</h3>
In visualforce, instead of hard coding labels, it best advised to get the label value from Custom Labels. So that, it gets translated automatically if its configured in Custom Labels.<br />
<h3 style="text-align: left;">
<br />Where it will be useful ?</h3>
It will be useful in following scenarios<br />
<br />
<ol style="text-align: left;">
<li> your Org users are geologically segregated across globe</li>
<li> when your end user is not proficient with English & want to give their native support.</li>
<li> when you develop an App for international market</li>
<li> It's not designed only for supporting languages other than English. Even, you can have a translation for English, by which you give power to Admin to change them later if they wish to. I normally use this in all my projects.</li>
</ol>
<br />
<br />
<h3 style="text-align: left;">
Where is the Code ?</h3>
I have illustrated with the example of how to display the label name in native language(Hindi).<br />
<br />
<br /></div>
<script src="https://gist.github.com/sankaran1984/c0848b4c12191dd490088f72bac46791.js"></script>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/4547493/21364450/d7625042-c6e8-11e6-8ca8-ce3813d701ea.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="https://cloud.githubusercontent.com/assets/4547493/21364450/d7625042-c6e8-11e6-8ca8-ce3813d701ea.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /><iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/vb0M0tPL3ys/0.jpg" src="https://www.youtube.com/embed/vb0M0tPL3ys?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
</div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com0tag:blogger.com,1999:blog-2645312411422687291.post-79551196990598877792016-12-20T02:47:00.001-08:002016-12-21T08:51:50.643-08:00Visualforce - Beyond Basics Series 30 - Use FieldSets for FutureProof<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
What is FieldSet ?</h3>
It is nothing but grouping the related fields in the sObject & giving them a Name.<br />
<h3 style="text-align: left;">
<br />What is the use of it ?</h3>
Since, it's a group of fields it can be used as a collection, rather than individual fields. At beginning, it may seems not required, but as organization grows, this feature is very important to maintain the Org health.<br />
<h3 style="text-align: left;">
<br />Where should be used ?</h3>
This will be used mainly in Visualforce & Apex. For example, you have created a feature which requires 100 fields to be processed by the user. Would you be happy to add inputField/outputField in the Visualforce page for all 100 fields ? Won't you think is there any better way ?<br />
yes, fieldset is the solution. you just fieldset to iterate through the fields & use them. These are the usefulness,<br />
<br />
<ol style="text-align: left;">
<li> efficient coding</li>
<li> less maintainance</li>
<li> future proof - you can add a field or remove from the fieldset, but doesn't need to change the page.</li>
</ol>
<br />
<h3 style="text-align: left;">
<br />How to use it ?</h3>
In visualforce page, you normally use repeat component to iterate through them & then, either input/output the values according the requirements.<br />
<h3>
<br />Where is the Code ?</h3>
I have illustrated how to use a fieldset to iterate & display the values in the page. you need to create the fieldset before running the page.<br />
<br /></div>
<script src="https://gist.github.com/sankaran1984/c124d5b26d8986cf8b2cf7f371f3a7f3.js"></script>
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="500" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/CprxrT2WBHQ/0.jpg" src="https://www.youtube.com/embed/CprxrT2WBHQ?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
Sankaran Nepoleanhttp://www.blogger.com/profile/09007496552976711485noreply@blogger.com1