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?

  • 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? – rael_kid Sep 30 '14 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 – Janardhan Reddy Sep 30 '14 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 – rael_kid Sep 30 '14 at 6:50
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.