I am new to SF app development. The situation: I have created a Hiring app and I have created a store location custom object and I wanted to learn how to use the geolocation so I could have a map that would show where jobs are available but that proved to be beyond my scope. So I have settled for having a store location custom object and I have a positions custom object. When a user creates a position record they choose where the job location(field type: Pick list) will be. I created a Store location custom object with the hopes that I can show how many jobs are open by location(sum for that location based off of how many job are in that location) and when you click on the location with the number of jobs it will show you what the jobs are. Is this possible? If so, how?
This is probably too late for your class project, but I'd suggest something like the following:
- You can use the Account object to represent stores, or a custom Store object. If you use the Account object and you are also using the Account object for other things (like vendors or customers), you will want a Store record type on the Account.
- Use a custom object for Position. Use a master-detail (MD) relationship field to point to the Store where the position is. (If you understand Apex/Visualforce you can create a custom Apex component that renders the stores in a dropdown, and use that in place of the MD field on the page layout. One of developers at the Salesforce.com Foundation has a type-ahead component on Github that you could try as well.)
- Add a Roll-Up Summary field to the Store/Account object that gets the COUNT of positions. If you have a status field on the Position object, you can use the Filter Criteria to only count the Open positions.
- You can now create a Visualforce page that contains a map of your stores. The Salesforce1 App Developer Guide has an example that uses Google Maps in a Visualforce page - see Chapter 11. You can customize the marker so that it shows the open positions at the store. The sample code is available on Github.