Month: January 2015

Google Polymer – Override Style

Here in this post, we will understand how we can override the default style in Google Polymer.Step 1 -Create the web component Hello-World-Override-Style.html as shown below -<link rel=”import” href=”../bower_components/polymer/polymer.html”><polymer-element name=”Hello-World-Override-Style” noscript> <style type=”text/css”> p { color: red; } </style> <template> <style type=”text/css”> p { font-family: Verdana; color: blue; } </style> <p>Hello Sudipta Deb</p> </template></polymer-element>As you can see we have two styles defined. Style 1 (Outside template tag) is just making the color of the font red and Style 2 (inside template tag) is making the font color as blue as well as set the font to Verdana.Source Code @ https://github.com/suddeb/Learning-Polymer/blob/master/elements/Hello-World-Override-Style.htmlStep 2 -Create the html page to refer the web component. Name of the html page is: testHello-World-Override-Style.html.<!DOCTYPE html><html><head> <title>Hello World Test with Google Polymer</title> <!– Load the platform support library –> <script type=”text/javascript” src=”bower_components/webcomponentsjs/webcomponents.min.js”></script> <!– Load the component –> <link rel=”import” href=”elements/Hello-World-Override-Style.html”></head><body> <!– Declare the element by tag –> <Hello-World-Override-Style></Hello-World-Override-Style> <p>Hello Pradipta Deb</p></body></html>Source Code @ https://github.com/suddeb/Learning-Polymer/blob/master/testHello-World-Override-Style.htmlStep 3 -Let’s check the output -Now as you can see that Style 2 is applied to the text inside the template of the web component. But Style 1 is applied to rest all <p> tags.So this post demonstrated how to override the default style in Google Polymer. Any feedback, please let me know....

Read More

Types of Chart for Dashboard in Salesforce

Salesforce reports are a great way to view and analyse data. If you’re new to Salesforce reports check out our Introduction to Salesforce Reports. Salesforce dashboards and charts are a helpful visual representation of your reports. Since dashboards and charts are much faster to look at and understand than reading a report they come in handy.TYPES OF SALESFORCE CHARTSThere are a few different ways that you can summarise data with Salesforce charts. Depending on the type of data you have there are a few different charts you can use.Vertical and Horizontal Bar Chart (Use horizontal bar chart to compare more groups than vertical)Line Chart (best for showing data over time)Pie / Donut Chart (Both are used to compare a group of data to the total. Donut Charts show the total in the middle)Funnel Chart (best for sales opportunities)Scatter Chart (Helps to visualise the correlation between values on a...

Read More

Types of Report in Salesforce

In Salesforce, we have four different types of report. I will explain each of them below -Tabular Report – This is the most basic report. It displays just the row of records in a table like format with grand total. Tabular reports cannot be used for generating dashboards. Below is a screenshot of Tabular Report on Opportunity object.Summary Report – This is the most commonly type of report. It allows grouping of rows of data. It supports sorting and displaying subtotals. Summary Report can be used to create Dashboard. For example in the below report on Opportunity object, report is grouped by type as shown below -Matrix Report – This is the most complex report format. Matrix report summarize information in a grid format. Matrix Report can be used to create Dashboard. Matrix reports allows records to be grouped by both columns and rows. Below is one example -Joined Report – A Joined Report can have data from multiple standard or custom report types. A joined report can have five report blocks where you can add summary fields, apply sorting, filter. Below is one example of Joined Report (All Opportunity vs Open Opportunity) –  [Note – Please refer Salesforce’s documentation on Joined Report. There you will get more examples and also the limitations of Joined Report. Here is the link – Joined...

Read More

Display Progress Bar using Formula Field in Salesforce – No coding is required

In this post, I will show how you can create a progress bar just using formula field in Salesforce. No coding required.The requirement is that for “Job Application” object, we have a picklist called “Status” which is having the values as -Based on the value chosen in pick list, we need to display the progress bar showing the progress of Job Application. So let’s do that -Step 1 -We need to upload two image files as Static Resources first. Yellow bar -Green bar -Step 2 -Create a field called in the Job Application object which will calculate the progress based on the values chosen in the Status field. The screenshot given below -Step 3 -Create another formula field to display the progress. The detail of the field is given below -Done.!!Let’s check how our Job Application page looks like -When Status = ‘New’ -When Status = ‘Review Resume’When Status = ‘Phone Screen’When Status = ‘Schedule Interview’When Status = ‘Extend an offer’When Status = ‘Hired’ / ‘Rejected’Great. Any feedback, please let me know....

Read More

Integrating Google Polymer with VisualForce – Salesforce

I am making myself busy in learning Google Polymer since last 2 weeks. Believe me, Google Polymer is the future, not because of it is developer by Google, because of it’s Web Component development style.Today morning, I was trying to integrate Google Polymer with VisualForce. I searched in Google, but there was hardly any stuffs how to integrate Google Polymer with VisualForce. So I thought why not document the basic steps with a Hello World example to demonstrate the integration of Google Polymer with VisualForce.Let’s start -Step 1:Download Google Polymer on your machine. Please refer my previous blog post to understand the procedure.Google Polymer – How to installStep 2:Once you download the polymer, you will find a folder named “bower_components”. Compress the folder with the name “Polymer.zip”. (Note: you can choose any name here :-))Step 3:Upload the Polymer.zip as static resource in your development environment as shown below -Step 4:Create your web component(New VisualForce Page) with Label: Hello-World, Name: Hello_World<apex:page contentType=”text/plain”> <link rel=”import” href=”{!URLFOR($Resource.Polymer, ‘/bower_components/polymer/polymer.html’)}”/> <polymer-element name=”Hello-World” noscript=”true”> <template> <p>Hello <b>SUDIPTA DEB</b> from Google Polymer Web Component</p> </template> </polymer-element></apex:page>Note: Created web component “Hello-World”.Step 5:Create the VisualForce Page(testHelloWorld) to refer the Web Component as shown below -<apex:page > <script src=”{!URLFOR($Resource.Polymer, ‘/bower_components/webcomponentsjs/webcomponents.min.js’)}”/> <link rel=”import” href=”/apex/Hello_World”/> <body> <!– Declare the web component by tag –> <Hello-World></Hello-World> </body></apex:page>Note: In the body section, I just referred web component by name. Before that I just imported...

Read More

Understand Field’s Visibility with Field-Level Security and Page Layout

We all know that Field-Level security (FLS) and Page Layout are very important concept. But let us understand the concept with multiple use cases. I always believe going through use cases/scenarios are the best way to learn the concept.Use Case 1:Object Name: StudentField Name: Student NameField is required: YesLet’s try to change the field’s security both in profile level as well as through page layout.Changing though Field Level Security @ Profile Level (say for profile: Sales User) –You can’t change Field Level Security for a field if the field is marked as required during declaration. The field will become visible for all the profiles as shown below -So is it possible to do something in page layout? Let’s check –Seems like here also you can’t do any changes. Below is the screenshot –So the conclusion is that if a field is marked as required during declaration, that field will remain required and visible in all the page layouts. You can’t make that field read-only also.Use Case 2:Object Name: StudentField Name: Student AgeField is required: NoNow we can have multiple scenarios. They are listed below –Scenario 1:Visible for Profile – Sales User: NoVisible for Profile – Executive User: YesRequired in Page Layout – YesObservation:Logged in as Adams, Karen (Profile – Sales User)Logged in as Bassi, Brent (Profile – Executive User)Scenario 2:Visible for Profile – Sales User: YesRead Only for Profile...

Read More

Archives