You need to sign in to do that
Don't have an account?
![JimmyPom JimmyPom](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
APEX Trigger or Custom Button?
Hi guys!
I need some advice on wether I should be learning / writing an APEX trigger, or wether a custom button would be better for my application.
I have the 'Cases' Related List in my Opportunities Section. My Cases object has 3x Record Types (New Warranty Service, New Installation Service & New Maintenance Service)
Under My Opportunity, I want to have the three buttons on the cases related list (New Warranty Service, New Installation Service & New Maintenance Service). Once they are clicked, I need different information from the opportunity to populate each different record type.
Am I best to use a custom button and 'URL HACK' it to populate these field, or should I look into writing an APEX tigger to 'future proof' my SFDC instance? I have been told that the 'URL HACK' is really just a temporary fix if SFDC decide to update field names etc, they will break.
Thanks in advance for the help!
Jimmy.
hi Jimmy,
our first option for a solution should be based on speed of implementation, complexity and how easy is to maintain that solution therefore, in salesforce.com, that means we should try first a solution that requires only poin-and-click changes - no apex/visualforce development.
Your requirement can be fulfilled with 3 list buttons that pre-select the recordtype and other fields from the Opportunity. I believe this is what you are suggesting but you doubt about the support of sfdc on this. I can tell you that we have this in many areas in our org and for a long time, never had a problem with a sfdc release.
Regards
Manuel
Fieldnames wont change frequently so you should use URL HACK and you can save lots of time which can be use for updating it later on if fieldname changes ;)