You need to sign in to do that
Don't have an account?
divya1234
account record detail page, add the VF page to show inline on page layout.
Hi All,
I am trying to add External link on account detail page by using inline VF page here is my code for vf page and controller
Can someone please help me with inline controller code to embed a link . i already implemented the same with web tabs and vf tabs but think is we need external link on account detail page not in the form of tab
I am trying to add External link on account detail page by using inline VF page here is my code for vf page and controller
<apex:page standardController="Account" extensions="inlinecontroller"> <apex:form > <apex:pageBlock title="My Inline Visualforce page"> <apex:pageBlockButtons > <apex:commandButton action="{!MicroLink4}" value="MicroLink4"/> //Microlink4 is link i created and embeded extenal link in it </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page>
public with sharing class inlinecontroller { Public contact conRec{get;set;} Public id accRecId; Public account accRec{get;set;} public inlinecontroller(ApexPages.StandardController controller) { accRecId = [select id,accountid from contact where id = :ApexPages.currentPage().getParameters().get('id')].accountid; if(accRecId != null) accRec = [select id,name,accountnumber,annualrevenue from account where id =:accRecId]; } }But not able to acive the same. my requirment is to embed the external link into salesforce possibly by using VF page than need to add into account detail page
Can someone please help me with inline controller code to embed a link . i already implemented the same with web tabs and vf tabs but think is we need external link on account detail page not in the form of tab
Below code can fulfill your requirements. Hope this will work for you.
Visualforce Page:
<apex:page standardController="contact" extensions="InLineController">
<apex:form >
<apex:pageBlock title="My Inline Visualforce page">
<b>Account Name : </b> <apex:outputField value="{!accRec.name}"/><br/>
<b>Account Number: </b> <apex:outputField value="{!accRec.accountnumber}"/><br/>
<b>Annual Revenue : </b> <apex:outputField value="{!accRec.annualrevenue}"/>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller:
public class InLineController {
Public contact conRec{get;set;}
Public id accRecId;
Public account accRec{get;set;}
public InLineController(ApexPages.StandardController controller) {
if(ApexPages.currentPage().getParameters().get('id') != null) {
accRecId = [select id,accountid from contact where id = :ApexPages.currentPage().getParameters().get('id')].accountid;
if(accRecId != null)
accRec = [select id,name,accountnumber,annualrevenue from account where id =:accRecId];
}
}
}
Please mark this as best answer if this solves your problem.
Thank you
Ajay Dubedi