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:-