0

I am a solo admin with no dev skills. We have a requirement to create a searchable page for our custom object ''Building'' they would like this page to allow user to search for building records, select the appropriate one, and make edits to fields. I was going to use Salesforce sites.com feature to host a VF page, to allow access to everyone without a SF account. Looking for any help in the steps I need to take to create this VF page for this custom object. I do not know what it will involve, ie. class creation?, triggers needed? vf page?

  • Is your page public? Why use sites? – Sebastian Kessel Apr 20 '16 at 4:00
  • Any requirements above and beyond search? If not, does the SF global search not meet your needs? – Eric Apr 20 '16 at 4:14
  • Sorry I shouldve clarified, we need the user to be able to search for the building records, ability to select the record view the details and also edit the fields they need on that record. – JazzyJ Apr 20 '16 at 13:15
0

Yes, ofcourse you need to use VF pages and apex class!

Your VF page should have an <apex:inputText> component. This is the text box where the users enter the text to search and an <apex:commandButton>'s action to call the method in Apex class, that does the searching.

You should use SOQL query in the method for searching the text entered. And the returned results should be sent to another VF page which displays the results. If the searching is to be done in multiple objects, you should be using SOSL. But in your case, SOQL should be enough. The 2nd VF page will have <apex:pageblocktable> or <apex:repeat> to show the results returned by the apex method.

You need to learn about the attributes/components I highlighted in the above paragraphs to proceed with your task.

Do try and post your code next time, so we can help further when you are struck. But this will let you start.

Here is list of visualforce components for your reference https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref.htm

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.