You need to sign in to do that
Don't have an account?
Taking more information from Opportunity when creating a new related Contract
Hello!
The opportunity/contract relationship is just an example, but it might work a bit better on your imagination. Important part is that I know how to do this so I can do this myself for other objects :)
What I am trying to do is the following (in story mode): I am viewing an opportunity, it is going to be Closed - Won, so I would like to create a contract related to this opportunity. I am going to the related list for Contract and click on 'New'. This takes me to the 'Create new Contract' page, the Opportunity look-up field is filled as I created it from the opportunity's related list. I want it to take more information from Opportunity and put it in the Contract fields (say amount, date and description). How do I do this? I am rather unfamiliar with the Salesforce coding and I only have base knowledge of programming in general, the help function on SF or searching on these forums gave me no results.
Thanks for reading!
Well, if u wanna pre-populate tha data, then triggers/formula fields won't work!! they will save the information after the record is saved and so you will not be able to see the data on the edit page.
For pre-population, you need to create a custom button with sourse as S-Control/VF page which will over-ride the standard new button and would execute the requisite logic for you. Finally, the user will be re-directed to the Edit page with the value pre-populated;)
See this for more info-
Link
Cool_D
All Answers
Well, if u wanna pre-populate tha data, then triggers/formula fields won't work!! they will save the information after the record is saved and so you will not be able to see the data on the edit page.
For pre-population, you need to create a custom button with sourse as S-Control/VF page which will over-ride the standard new button and would execute the requisite logic for you. Finally, the user will be re-directed to the Edit page with the value pre-populated;)
See this for more info-
Link
Cool_D
Yes, it's definitely easy ;)
Way to go!!
Cool_D
Apparently it isn't as easy as I expected. What I've got now is the following: /a0B/e?retURL={!Opportunity.Id}&3DCF00N80000004Kaos={!Opportunity.Name}. This link is a Detail Page Button on the Opportunity screen and I want it to create a new Order (the custom object a0B). It opens the Order screen, but the Opportunity field isn't getting filled. I'm not sure if the 3DC00N80000004Kaos is the right link, I looked it up with that Firefox Web Developer app from the Edit screen in Order (not setup). I've also tried it without the '3DCF' part. Any insight on what I might be doing wrong? I'm not sure what the 2 fields are referring to (Opportunity.ID and Opportunity.Name). Thanks.
You need to check the Source HTML of the edit page and see what is the ID of the field you want to pre-populate!!
Also check, if the URL has the 2 values which you wanna pass over to the create contract page.
Cool_D
So I'm trying to get the Opportunity Name field from Opportunity to automatically fill in in the Order tab Opportunity field with this code: /a0B/e?retURL={!Opportunity.Id}&32Fa0B80000005Ouh0={!Opportunity.Name} but so far all it does is open a new window with the "New Order" page.
So from: http://img682.imageshack.us/i/opp.jpg/ to: http://img682.imageshack.us/i/ordl.jpg/.
Thanks again for the answers :)