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
BobBob 

Need a way of posting warranty information on a piece of equipment

I am trying to figure out the best way to handle posting warranty information on a piece of equipment. An example is I have a piece of equipment; call it a 525AT. That piece of equipment may have serveral different warranties  Commercial, Consumer, Entry Commercial. I need those warranties to be displayed on each peice of equipment with maybe visualforce page on the equipment page. I've tried a couple differnt things with no luck.  Currently this objects are not related. 

If anyone could point me to a possible solution that would be helpful.


The object names:
Unit__c
Warranty__c

Equipment:
525AT

Warranty Info:
Commercial 
part 1
labor 1
frame 1

Consumer:
parts 3
Labor 3
Frame 5

Entry Commercial:
Parts 2
Labor 1
Frame 1
AK-2AK-2
Here is one way - 
1. Add a custom picklist field warranty__c on the equipment object and add three values - Commercial, Consumer, Entry Commercial
2. Also add three formula fields - Parts warranty, Labor warranty and Frame warranty to the equipment object.
3. Set the parts warranty formula field to return "1 year" if warranty__c picklist value is "Commercial", "3 year" if "Consumer" and "2 year" if Entry Commercial. Similarly set formula fields for labor warranty and frame warranty.

You could make it fancier by using custom settings for each of the warranty types and the corresponding parts/labor/frame warranties if you choose. 

Hope this helps.
BobBob
The problem with your solution is I need to have all three of those warranties post for one product . I have formula fields right now and I’m trying to make it so eventually I will add a force.com site so our customers can search for their warranty via the site. Thank you
AK-2AK-2
Bob,

I must not have understood your initial problem description. I was thinking you will have a single field Warranty__c as a picklist where you can choose the type of warranty for the equipment. Once you select the type of warranty for the equipment record, the parts, labor and frame warranty fields will be populated using the formula.

If you can explain the problem a little more, I can try to answer it.
BobBob
Thank you, On the unit object, there is a product field that has the model number of that particular machine. I created the separate object warranty because my entail idea was to have ever warranty as it’s own record. Then create a visualforce page that will look at the unit object product field and post all the warranties in a related list There are thousands of machines with the same product number so I’m not sure how I can accomplish this. I was also thinking I could create a trigger that would create new warranty records when a unit does not have any warranty records associated with it. But I’m not sure if that is the best way to solve this problem.
AK-2AK-2
Not sure how the unit object is related. However, if a single equipment can have multiple different warranties and if you need to be able to pick the number of years/months for each type: parts, labor, frame for each type of warranty, then your solution is probably the best.

The warranty object could have five fields:  master-detail field to link the warranty object to the equipment, type picklist (commercial, consumer, entry commercial, etc.) and 3 picklist fields (labor/parts/frame) where user can select the number of years/months. You can then create as many warranties related to equipment object as you need. If you want, you could use record type for the warranty object instead of the type picklist.

I am thinking using triggers may be a unnecessary. However, I am not sure I understand the use case completely.
 
BobBob
I have two custom objects (Unit__c & Warranty__c) The warranty object has different types of warranties on individual records (Commercial, Entry Commercial and Consumer). A unit is a machine and I'll call it 525T. Each unit may have 1 or more warranties that pertain to the 525T (Commercial, Entry Commercial and Consumer).  I need to find a way via trigger ,apex code, visualforce , etc. that will display each warranty record to many 525T records with out creating new warranty records. I have a field on the warranty object called product__c, which is also on the unit object.  I was hoping to associate the record by some kind of search on that field.  So if the unit record has a product number of 525T, and the warranty record has a product number of 525T include all matching 525T warranty records to that unit record. Any help would be greatly appreciated.