function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
goosegoose 

Ideas on implementing objects with functionality similar to activities

Hi,

New to salesforce. I'm trying to implement a system which involves a transport booking system. There are quite a few custom objects such as vehicles, agents, offices, staff etc - which appear straightforward to implement within the standard app setup. However, with implementing the booking themselves, I'd like to add functionality similar to salesforce activities.

A 'trip' is assigned to an account - and can be related to contacts and various other custom objects. It has three possible states: query, booking and historical-record.

As a trip progresses, it starts as a query, is 'promoted' to a booking and finally becomes a historical-record when the trip is complete and the vehicle is returned.

The change of state could be done manually - either changing a dropdown - or hitting a button. But I'd like them to be displayed in three seperate subpanels under an account detail record - progressing from one to the next and the next as their states change (trip query, trip booking and trip history). Similar to how calls or meetings are moved from 'open activities' to 'activity history' as they are completed.

Any thoughts or recommendations on the best way to progress with this?

Thanks
jpizzalajpizzala
Your Trip sounds a bit like an Opportunity.  Have you tried creating an Opportunity record type to reflect the information necessary for a trip?  You won't get the related list advancement that you wanted, but you will have much more standard support for it via forecasting and other analytics.

I don't think there is any other way to do this with the standard Salesforce functionality.  You could, I guess, create an elaborate Apex-driven "approval/advancement" process for the "trip" records.  In order for a trip record to show up in three different related lists, it must be represented by three different objects as it progresses.  i.e., a Trip Query object record would be created first, then a Trip Booking object record would be created (and the Trip Query record deleted), then finally a Trip History record would be created (and the previous Trip Booking record deleted).  Each of these three different objects would have a relationship with the Account object.

But this is a very messy approach.  To simplify things a bit, you could utilize VisualForce to modify the Account detail page.  This way, you could create a single object, Trip, with the status dropdown you specified.  VisualForce allows you to create standard-looking Salesforce components (like related lists and detail pages) very easily.  You could create the Account detail block and three related list components and populate them with records grouped by their specific status (Query/Booking/History) via a query executed with a custom Apex Controller.

For more info on VisualForce, I would suggest checking out the VisualForce Developer's Guide.
goosegoose
Hi,

Thanks for the reply. I need the related list progression so the suggestion to try opportunities would not be appropriate.

I agree that having three different object types for each stage is a bit cludgy so I'll have a look at visual force as you suggest.

Cheers.
goosegoose
Hi,

I've been investigating related list components and it seems that it is not possible to 'filter' their contents via a custom controller. have I understood that properly?

The only other thing would be to use some sort of data table.

Thanks