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?

  • Anything's possible. Whether you should do it is another question. Why doesn't the geolocation feature work for you? It sounds like you're creating a mess and re-inventing the wheel at the same time. – Nick Cook Jul 8 '14 at 4:31
  • I couldn't figure out how to work the geolocation and I'm not even sure of its capabilities so I scrapped the geolocation idea. I thought it would be nice to see where jobs are open by location. By creating a Pick list field on the positions tab where a location would be selected I thought I could take that info and have it appear on the Store location object. What would be a better way of doing this? – Boby Light Jul 8 '14 at 4:45
  • Maybe your question should be around the usage of the Geolocation then? I also don't understand why you wouldn't have a Store (which has a location) that has many Positions (Child / related list). The Store could even be an Account, which means you could use some of the standard features and/or plugins for the mapping side of things. – Nick Cook Jul 8 '14 at 5:11
  • The business has sites in many different locations. And at each business location there can be many different job openings. Thats why I wanted a custom object the user can click on and there they would be able to see locations with a sum of how many openings there are at that place. I know this must be very confusing and probably very trivial but I am new with all this and your assistance is really appreciated. Would you suggest I continue with my train of thought or scrap it for a better field like geolocation? This is a class project and I was unable to get sufficient help with a tutor. – Boby Light Jul 8 '14 at 5:38
  • To me, what you have are multiple Account Sites, each with it's own location and positions. I think your model should just use Accounts with a Position custom object related to it. You can relate Accounts to each other using the standard Parent Account field, and if you want to show the number of Positions per Site (Account) this can easily be shown in a report. This has the added benefit of working out of the box with other applications, especially Salesforce1. – Nick Cook Jul 8 '14 at 6:22

This is probably too late for your class project, but I'd suggest something like the following:

  1. 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.
  2. 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.)
  3. 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.
  4. 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.
| improve this answer | |

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.