2

Example use case:

I have three objects: Order, Item, and OrderItem. OrderItem is the junction object that relates Orders to Items (because an Order can have many Items) and Item to Order (because an Item can appear on many Orders).

Now, if I employed CSRs to take customers' orders over the phone, logically they would create a new Order in the system, and add existing Items (filtering by ItemID) to that order. In this case, the OrderItem junctions are created automatically without the user of the system even noticing.

Is this possible in Salesforce? And, can anyone point me in the right direction regarding how to accomplish this?

  • 1
    Generally speaking, you'd use a Visualforce page to expose a seamless interface. See the documentation on Apex Code and Visialforce. Once you have more specific questions we can help you through them. – sfdcfox Apr 30 '14 at 19:00
  • There is no way to do this natively without the use of VF? I was trying to avoid VF so that I wouldn't be required to push continual improvements when the platform is updated. Also, does VF give me the ability to create 'hover' AJAX as I would using a JS framework? Drag & drop is the preferred method, which seems pretty complex in the SF environment. – toolshed Apr 30 '14 at 19:17
  • You don't get drag and drop as native elements, but you can drop in jquery or your favorite library to do your own drag and drop. Also, native html5 is supported if you want to be future looking. – sfdcfox Apr 30 '14 at 20:44
2

If I understand the question correctly, this can be done without Visualforce using default layouts. Add OrderItem as a related list to your Order default layout. (Fields from Item can be included in the displayed fields.) Then the process could be:

  • CSR creates and Order
  • CSR clicks "New" on the OrderItem related list
  • In the "New OrderItem" page, the Order lookup field will be pre-populated with the Order name, but the Item won't be; the CSR uses the lookup button on the Item lookup to choose the Item (with what is presented customisable via the Item Search Layouts)
  • The CSR clicks Save
  • Repeat previous 3 steps to add further Items (by adding further OrderItems)

Not as elegant a presentation as Visualforce might produce, but leverages the platform features and is not much effort to put together.

| improve this answer | |
  • 1
    The "Save and New" button is handy for this kind of thing. – Jeremy Nottingham May 31 '14 at 4:07

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.