A blog containing Salesforce coding examples in detail.It's a place where you can find solutions to the problems that you may face in your daily salesforce coding. Apex classes,visual force page,we services,Integration,plugins,extensions,Lightning web components,Aura components,Email Messages,Sales cloud,service Cloud,Marketing Cloud.Lightning Web components,salesforce.com, Salesforce Tips and Tricks,short cuts,ApexMocks,Stubs, visibility,Salesforce Shorts
Wednesday, November 9, 2016
Saturday, November 5, 2016
Hover Functionality in Page Block Table Salesforce
Example :
Apex Class :
public class HoverOnPageBockTable {
public List<Account> accList {get;set;}
public HoverOnPageBockTable () {
accList =[select id,name,phone from Account limit 5];
}
}
Visualforce Page:
<apex:page controller="HoverOnPageBockTable">
<style>
a:hover {
background:#ffffff;
text-decoration:none;
}
a.tooltip span {
display:none;
padding:2px 3px;
margin-left:8px;
width:250px;
}
a.tooltip:hover span{
display:inline;
position:absolute;
background:#FFC;
border:1px solid #cccccc;
color:#000000;
}
</style>
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!accList}" var="acc" id="pb">
<apex:column rendered="true">
<a class="tooltip" target="_blank">{!acc.name}
<span>
{!acc.Name} - {!acc.id}
</span>
</a></apex:column>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
Output:
Apex Class :
public class HoverOnPageBockTable {
public List<Account> accList {get;set;}
public HoverOnPageBockTable () {
accList =[select id,name,phone from Account limit 5];
}
}
Visualforce Page:
<apex:page controller="HoverOnPageBockTable">
<style>
a:hover {
background:#ffffff;
text-decoration:none;
}
a.tooltip span {
display:none;
padding:2px 3px;
margin-left:8px;
width:250px;
}
a.tooltip:hover span{
display:inline;
position:absolute;
background:#FFC;
border:1px solid #cccccc;
color:#000000;
}
</style>
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!accList}" var="acc" id="pb">
<apex:column rendered="true">
<a class="tooltip" target="_blank">{!acc.name}
<span>
{!acc.Name} - {!acc.id}
</span>
</a></apex:column>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
Output:
Friday, November 4, 2016
Some Salesforce related tools/apps that ease our work
At First,I would like to say thanks to Benewards for sharing those tools.
I am just sharing the url so that my friends will get benefited from it.
Go through the url : SFDC Tools where you find some tools that may be helpful to you.
I am just sharing the url so that my friends will get benefited from it.
Go through the url : SFDC Tools where you find some tools that may be helpful to you.
Thursday, November 3, 2016
How to display hover details in visualforce Page(Pop Over Page)
Solution : Use the below syntax to display hover popover page
<a href="/{!acc.Id}"
id="{!acc.Id}"
position="relative"
onblur="LookupHoverDetail.getHover('{!acc.Id}').hide();"
onfocus="LookupHoverDetail.getHover('{!acc.Id}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show();"
onmouseout="LookupHoverDetail.getHover('{!acc.Id}').hide();"
onmouseover="LookupHoverDetail.getHover('{!acc.Id}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show();">
{!acc.name}
</a>
where acc.id will be the id of the object
Example :
Apex Class :
public class HoverDetailController {
public List<Lead> leadList {get;set;}
public HoverDetailController () {
leadList =[select id,name,LeadSource,Status from Lead limit 5];
}
}
Visualforce Page:
<apex:page controller="HoverDetailController">
<apex:pageBlock title="Lead Records With Hover Page on hover">
<apex:pageBlockTable value="{!leadList}" var="lead">
<apex:column ><a href="/{!lead.Id}" id="{!lead.Id}" position="relative"
onblur="LookupHoverDetail.getHover('{!lead.Id}').hide();"
onfocus="LookupHoverDetail.getHover('{!lead.Id}', '/{!lead.Id}/m?retURL=%2F{!lead.Id}&isAjaxRequest=1').show();"
onmouseout="LookupHoverDetail.getHover('{!lead.Id}').hide();"
onmouseover="LookupHoverDetail.getHover('{!lead.Id}', '/{!lead.Id}/m?retURL=%2F{!lead.Id}&isAjaxRequest=1').show();">
{!lead.name}
</a>
</apex:column>
<apex:column value="{!lead.LeadSource}"/>
<apex:column value="{!lead.Status}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Output :
Important Note : If we want to add/remove some fields from popover page,you can do that in mini page layout.
<a href="/{!acc.Id}"
id="{!acc.Id}"
position="relative"
onblur="LookupHoverDetail.getHover('{!acc.Id}').hide();"
onfocus="LookupHoverDetail.getHover('{!acc.Id}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show();"
onmouseout="LookupHoverDetail.getHover('{!acc.Id}').hide();"
onmouseover="LookupHoverDetail.getHover('{!acc.Id}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show();">
{!acc.name}
</a>
where acc.id will be the id of the object
Example :
Apex Class :
public class HoverDetailController {
public List<Lead> leadList {get;set;}
public HoverDetailController () {
leadList =[select id,name,LeadSource,Status from Lead limit 5];
}
}
Visualforce Page:
<apex:page controller="HoverDetailController">
<apex:pageBlock title="Lead Records With Hover Page on hover">
<apex:pageBlockTable value="{!leadList}" var="lead">
<apex:column ><a href="/{!lead.Id}" id="{!lead.Id}" position="relative"
onblur="LookupHoverDetail.getHover('{!lead.Id}').hide();"
onfocus="LookupHoverDetail.getHover('{!lead.Id}', '/{!lead.Id}/m?retURL=%2F{!lead.Id}&isAjaxRequest=1').show();"
onmouseout="LookupHoverDetail.getHover('{!lead.Id}').hide();"
onmouseover="LookupHoverDetail.getHover('{!lead.Id}', '/{!lead.Id}/m?retURL=%2F{!lead.Id}&isAjaxRequest=1').show();">
{!lead.name}
</a>
</apex:column>
<apex:column value="{!lead.LeadSource}"/>
<apex:column value="{!lead.Status}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Output :
Important Note : If we want to add/remove some fields from popover page,you can do that in mini page layout.
Subscribe to:
Posts (Atom)
-
How to retrieve validation rules using package.xml in vs code salesforce - Salesforce Globe For You Problem : Assume a validation Mobile_...
-
Assume AccountPage is an apex class in salesforce. Sample Xml file : <?xml version="1.0" encoding="UTF-8"?> ...