Tuesday 16 June 2015

Salesforce Visualforce Page Code Generator

Visualforce page code with a button click, reduces time to write VF page again and again.

Install the package : https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000Pqos

After installation just append “/apex/vfgenerator__codegenerator” in URL.






Object Name : Valid object API name (include namespace if any)
Record Type : Record type Id of object selected in Object Name
Type of Page :
  1. Edit : Code will be generated for the edit page of the object (according to “Record Type” layout if selected any).
  2. Detail : Code will be generated for the detail page of the object (according to “Record Type” layout if selected any)
  3. Custom Detail : Code will be generated for detail page according to the fields selected from UI
  4. Custom Edit : Code will be generated for edit page according to the fields selected from UI

In the above screen I have selected “Edit” as the type of page and “Account” in object, also provided my email. When I click “Generate Code” it displays like this



Just copy the code and paste it in new visualforce page. For get full formatted code enter your email address in given field.

Now lets try creating some custom visualforce page. Select “Custom Edit” in “Type of Page” and “Account” in “Object Name”. It will display a section “Select Fields”. Click on “Display Fields”, it will display all fields which are up datable by present user.





2 comments:

  1. Great website with good information. It's been some time since you guys have not posted any new info. I am sure that I am not alone but you guys are doing some great work for Salesforce community. Please keep updating the site. Thank you

    ReplyDelete