0

I have custom page in managed package and I added one custom button in this page when I click on this button I want to add one custom field in that page. Can any one help me?

3
  • What have you tried so far? Do you have a custom field in an org where you package is installed and you want to show that on a page that's included in the package? Sep 30, 2014 at 6:32
  • i have one button when user click that button i want adding new field process then i want show that field in that vf page Sep 30, 2014 at 6:33
  • If you actually want to create custom fields with a button on a VF page, I think you have to use the metadata API. It is possible to use the metadata API from an apex controller, but it will be complicated. See this link for the metadata API help: salesforce.com/us/developer/docs/api_meta/api_meta.pdf and this is a link to someone's implementation of it github.com/financialforcedev/apex-mdapi Sep 30, 2014 at 6:50

1 Answer 1

0

Janardhan,

Your problem is still not clear.

But I think you want to show a custom field of an object on button click.

If above assumption is correct , then you can do like below

<apex:commandbutton action="{!toggleRender}" value="Show Field"/>
<apex:outputpanel id="fieldrender" render="{!checkRender}">
 <apex:inputfield value="{!object.fieldname}"/>

public boolean checkRender{get;set;} 
public void toggleRender(){
 checkRender = checkRender ? false :true;

}

Please explain your problem little more if my assumption is not correct.

please mark this as a answer if this solve your problem

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .