You need to sign in to do that
Don't have an account?
parsa033
S-Control to create a new Opportunity
I want to create a button that creates an opportunity with defined fields. This is what I got so far:
window.parent.location.href="{!URLFOR($Action.Opportunity.New
,Opportunity.Id, [opp4= Account.Name, opp3="ProductName - "&Account.Name, opp7= "555", opp9= TEXT(MONTH(Today()+7))&"/"&TEXT(DAY(Today()+7))&"/"&TEXT(YEAR(Today()+7)) , opp11="Qualified Lead",p3="012500000009CJ7"])};"
,Opportunity.Id, [opp4= Account.Name, opp3="ProductName - "&Account.Name, opp7= "555", opp9= TEXT(MONTH(Today()+7))&"/"&TEXT(DAY(Today()+7))&"/"&TEXT(YEAR(Today()+7)) , opp11="Qualified Lead",p3="012500000009CJ7"])};"
This works. it takes me to the opportunity creation page though with all the fields that are defined filled up, but I have to still click on the create buttons.
Is there a way that I can do this and make it automatically create the opportunity and send me to the opportunity page rather than showing me the create form all over again.
OK, I'm no expert so I can't guarantee my answers but when using the same method to edit an opportunity automatically, you append ",save=1" to the end of the field to force an auto-save. I would guess that the same will work when creating an Opp. That makes your URL look like this:
,Opportunity.Id, [opp4= Account.Name, opp3="ProductName - "&Account.Name, opp7= "555", opp9= TEXT(MONTH(Today()+7))&"/"&TEXT(DAY(Today()+7))&"/"&TEXT(YEAR(Today()+7)) , opp11="Qualified Lead",p3="012500000009CJ7,save=1"])};"