You need to sign in to do that
Don't have an account?
morgan130
Help with S-Control to copy Opportunity Fields to Contract based on Contract Record Type
I need help pointing me to the documentation that describes how to create an s-control for the following:
Background:
- We have created a lookup field from the Contract to the Opportunity since all of our Contracts are associated with an Opportunity
- We are using Contract Types to distinguish the differences in required fields based on type, and have associated page layouts for each type.
- Some Contract Types are direct results of an Opportunity (Acquisition, Renewal), while other Contracts are actually addendums or changes to the original Contract. These Contracts will supersede the original Contract. (These are the cases where we may have more than one Contract associated with an Opportunity.)
Solution Needed:
- We would like to override the "New" button for the Contract detail list within the Opportunity page so that for specific Contract Record Types (Acquisition, Renewal but not Addendums), 5 fields from the Opportunity will be copied to the Contract.
We started with a trigger that populates the Contract fields from the Opportunity fields, but of course, this happens after the user selects to save the new Contract. We would like the fields to be prepopulated on the Contract detail page before the user starts entering fields for the Contract.
Any help you can provide would be most appreciated!
Apologies, Rex. I didn't understand what you meant by "URL rewriting concepts".
No, I have not done anything like this before. I have read a lot of posts that have examples that are close, and there is a ton of documentation, I'm just missing the documentation that gives an overview of the syntax for doing this. I know generally about custom links and using URLFOR...
Hey Rex,
We have not explored Visualforce pages...although I understand that s-controls have a short life, and visualforce pages look like they are incredibly powerful. We have some limitations with our technical resource expertise, so for our initial launch, we have approved using s-controls (and Apex).
I appreciate your response as it has confirmed that we might pick a short term solution of adding a custom button to the Contract page that allows the user to select it to "refresh" those fields from the Opportunity at will. While this is not an optimal user experience and will cost the user an additional step of creating the object and then selecting the button, at least the user has total knowledge of when the fields get updated. (We had also discussed adding triggers for Opportunity add/update to keep the fields in sync and then protecting those fields on the Contract but there are some cases where we might need to vary from that syncing rule.)
The buttons you suggest are a great idea...although we actually have 9 record types total, so that may be a bit much for our particular scenario. But I do appreciate your help and quick response. This was my first experience using the discussion boards...and you've made that a good experience!
Message Edited by Rex on 08-28-2008 12:24 PM
Message Edited by Rex on 08-28-2008 12:25 PM