includes some of the problems and solution which i face while developing it.
Friday, 28 February 2014
Tuesday, 11 February 2014
Send email with attachment from Apex class and VF Page in salesforce.
Hi friends,
This post shows how to send Email with Attachment using Apex Controller and VF Page.
I am writing this post because it’s a common requirement to sends emails from salesforce with attachment to clients, contacts etc.
As per my knowledge there are two ways to send email from Apex:-
1.
By using email templates.
2.
By using Messaging class.
Here I am using Messaging class for sending email from apex class:-
Screen shots:-
hope it helps, happy coding...
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,
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:
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....:)
Labels:
color,
CSS,
custom tab,
javascript,
JS,
salesforce,
sfdc,
style,
tab,
tab color,
vfpage
Monday, 6 January 2014
Genrate Bar Codes from UPC or SKU by REST API.
Labels:
apex,
attachment,
bar code,
BarCode,
class,
image,
salesforce,
sfdc,
vfpage,
Visual force Page
Monday, 23 December 2013
Add PDF VF-Page to Notes and Attachment from custom button and refresh current page.
Hi Friends,
In this post i m writing how to add the attachment to Note
& Attachment of Salesforce.com from VF-Page which is rendered as “pdf”
from detail page Custom button.
Here the Custom button code its of onclick java script behaviour:-
window.showModalDialog('/apex/PDF_Page?id={!Lead.Id}','',"
dialogWidth:800px;dialogHeight:500px; center:yes | no | 1 | 0 | on | off");
location.reload(true);
dialogWidth:800px;dialogHeight:500px; center:yes | no | 1 | 0 | on | off");
location.reload(true);
Here i used two VF-Pages to avoid recursive calling of VF Page because I am saving Attachment of page to Notes and
Attachment of same object.
Note:-
Remember not to call the method from "PDF_Page_demo".
Happy Coding...:)
here the sceern shots:-
Tuesday, 17 December 2013
Show Radio Button on the VF page
Saturday, 30 November 2013
Showing image in the ms-word document from vf page of Salesforce.
Hi guys,
I am writing this because one of my friend get stuck in this requirement, I
am also get surprised why the image is not showing in the MS-Document,
then finally I got its solution.
then finally I got its solution.
Here the code for the VF-Page,
<apex:page
sidebar="false"
showHeader="false"
contentType="application/msword#Test.doc"
cache="true">
<head>
<meta
http-equiv="Content-Type"
content="text/html;charset=UTF-8"
/>
</head>
<img src="Document_URL"
/>
</apex:page>
--> Document_Url is the url of the your image uploaded in the
Document object of Salesforce.
--> cache = "true" for IE.
Hope it helps...
Happy Coding...
Thanks,
Anurag Jain.
Subscribe to:
Posts (Atom)