Showing posts with label salesforce. Show all posts
Showing posts with label salesforce. Show all posts

Friday, 17 January 2014

Use Tab Color Dynamically on VF page from JS.





Hi guys,

I am writing this post because recently i used it and feel must share it,

Here I am creating a VF with some colored arrow on page (Created by using CSS) and color of arrows automatically changes according to the color and style of the Custom-Tab,

This requirement is mainly needed when you are creating a detail VF page

Now magic is to use arrow color same as the Tab color of your object.

I achieved this using Javascript and CSS,

Here is the VF page code:-


Screen Shots:


Now, i just changed Tab Style and color by following these steps:-

Setup -> Create -> Tabs -> Custom_Object__c

Here is the new Tab style and color:-


arrows and highlighted section color changes automatically.


Hope it will help u guys, Happy Coding....:)

Monday, 6 January 2014

Genrate Bar Codes from UPC or SKU by REST API.







Hi friends,

By this post I’ll show how to save Bar Code in Salesforce by using UPC code,

I call web service of third party which gives the image of Barcode (by using REST Api’s) and that image is Saved in the Notes and Attachment of Product.

Here the Sample code for same:-

Screen Shots:-







Tuesday, 17 December 2013

Show Radio Button on the VF page


Hi Guys,

here the example to show the Radio buttons on the VF Page and toggle between them,

Controller Class And VF Page:-


this is the screen shot of the VF page.

Tuesday, 26 November 2013

Shows Standard Salesforce Report Chart to Standard Salesforce Sidebar.





Hi guys,

   I’m writing this post because it may be the requirement of your clients and their is not direct way to show chart on Standard sidebar of salesforce.

This is actually the new type of requirement form one of my client, he wants to see the report chart on every page of its salesforce account, so solve it in this way to put chart on sidebar and show make visible the sidebar on every page.

Basically i opens an "iframe" on the html of Home Page Components.

So here the steps:
1.      Create a Report chart according to you requirements, make sure that this chart is of Tiny in size so that it can easily come in sidebar window.
2.      then go to Setup > Customize > Home > Home Page Components > Custom Components > New,
then choose the “HTML Area” then next and selects Narrow(Left) Column, click on show html check box on the right  corner and put the following code in it:

<iframe src="https://cs14.salesforce.com/Report_Id" scrolling="no" height="620px" width="150%" style="margin-top: -445px; margin-left: -70px;"/>
 
3.      Now add this component to the home page layout
(Note: make sure you assigned the page to the profile in the Home Page Layout.)
Now you can see that report chart is showing to the home page side bar as,

If you want to show it on every page then,
Go to Setup > Customize > User Interface > Sidebar
then true the “Show Custom Sidebar Components on All Pages” check box and save it,

That’s it, now the report chart is showing on every page of you Salesforce where sidebar is visible as:

Happy Coding…:)

Thanks,
Anurag Jain,