You need to sign in to do that
Don't have an account?
pavan 14
how i can show visualforce on custom object pagelayout
could any one explain even though i wrote standard controlller
<apex:page standardController="japan__c" recordSetVar="jap">
<apex:dataTable value="{!jap}" var="a">
<apex:column value="{!a.name}" />
</apex:dataTable>
</apex:page>
i am unable to see Visualforce in page layout. do i need enable anything in specific .
<apex:page standardController="japan__c" recordSetVar="jap">
<apex:dataTable value="{!jap}" var="a">
<apex:column value="{!a.name}" />
</apex:dataTable>
</apex:page>
i am unable to see Visualforce in page layout. do i need enable anything in specific .
A VisualForce page can only be added to an object's Page Layout if it declares the standardController attribute and its type must match(RecordSetVar should not there). I mean to say that you can not display ListController related VF in page layout. To check this concept, you please save the below VF in your instance then open page layout, it will be visible for you.
<apex:page standardController="japan__c">
</apex:page>
However, if you want to display your list of records then you use extension controller then store your list of records into one of your Controller property then iterate that list property in your VF.
e.g.
VF
-----------------------
<apex:page StandardController="Account" extensions="ExtController" readOnly="true">
<apex:pageBlock >
<apex:pageBlockTable value="{!esProjList}" var="eachSubProject" rendered="{!(subProjList.size != 0)}">
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
// controller
----------------------------------
public with sharing class ExtController {
public static Account currentAccount;
public List<ANYCUSTOMOBJECT> esProjList{
get{
if(esProjList==null){
esProjList = [Select Id,Name,Owner.Name FROM ANYCUSTOMOBJECT where ACCOUNTIDLOOKUPFIELD=:currentAccount.Id];
}
return esProjList;
}
private set;
}
public ESCompanyRelatedProjectsCnt(ApexPages.StandardController stdController) {
currentAccount = (Account)stdController.getRecord();
}
}// END - Controller
Regards,
Pawan Kumar
All Answers
Please check below link that will solve your problem.
https://developer.salesforce.com/forums/?id=906F0000000AUdbIAG
Regards,
Pawan Kumar
Thanks for reply .But still then i am unable to get as you said .Could you help with any other alternate soultion that would be really helpful.
Regards
Pavan.
A VisualForce page can only be added to an object's Page Layout if it declares the standardController attribute and its type must match(RecordSetVar should not there). I mean to say that you can not display ListController related VF in page layout. To check this concept, you please save the below VF in your instance then open page layout, it will be visible for you.
<apex:page standardController="japan__c">
</apex:page>
However, if you want to display your list of records then you use extension controller then store your list of records into one of your Controller property then iterate that list property in your VF.
e.g.
VF
-----------------------
<apex:page StandardController="Account" extensions="ExtController" readOnly="true">
<apex:pageBlock >
<apex:pageBlockTable value="{!esProjList}" var="eachSubProject" rendered="{!(subProjList.size != 0)}">
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
// controller
----------------------------------
public with sharing class ExtController {
public static Account currentAccount;
public List<ANYCUSTOMOBJECT> esProjList{
get{
if(esProjList==null){
esProjList = [Select Id,Name,Owner.Name FROM ANYCUSTOMOBJECT where ACCOUNTIDLOOKUPFIELD=:currentAccount.Id];
}
return esProjList;
}
private set;
}
public ESCompanyRelatedProjectsCnt(ApexPages.StandardController stdController) {
currentAccount = (Account)stdController.getRecord();
}
}// END - Controller
Regards,
Pawan Kumar
I am trying to do the same but am unable to replicate the excellent sugestion above- could you post your code please as it may help me resolve my issue?
Thanks
see: ShowBox (https://showbox.onl/) Mobdro (https://mobdro.onl/) Vidmate (https://vidmate.onl/)
(https://packagespoint.com)
https://projectfreetvus.com/
Whatsapp Love Status (https://lovestatusz.com)