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
DAC11DAC11 

'Create New Opportunity' button off Task.

Hello, Is it possible to create a button on a task called 'Save & Create New Opportunity' which when clicked will open a new opportunity window with the Account field pre-populated with the related to field from the task (the task would have been created off an account). It is just cutting out some steps.

 

I am wondering if this can be done using just visualforce without the need to go into eclipse or something similar and create test classes etc...

 

 

I'm new to visualforce and there is an online tutorial that I have found very helpful in teaching me the basics. (http://www.salesforcetrainingpodcasts.com/courses/dev405/shell-orig.htm)

 

 

I created a similar button some time ago with the help of salesforce, I think we used apex (Create case button on an Opportunity - it dragged a number of fields from the opportunity into the case so that the user didn't have to populate them manually) but unfortunately have lost the code.

 

 

Any feedback would be appreciated,

DAC

Pradeep_NavatarPradeep_Navatar

Create a custom button on Task detail page and in 'Button or Link URL' give '/006/e' to open the New Opportunity page. But as I think it’s not possible to populate the Account field value with the related to field on Opportunity new window because these are the standard pages so communication may not be possible.

DAC11DAC11

Thank-you so much Pradeep, I was able to get started with that, and remembered the other button i built, it actually worked and populated the 'related to' field into the 'Account name' field of the Opportunity. I used the link (http://salesforce.phollaio.com/?s=returl&x=0&y=0) to get the field names I needed.

 

/006/e?&
opp3=New Sale&
opp4_lkid={!Task.What}&
opp14= {!Task.Description}&

 

However I was just wondering is there a way of putting the button on the edit mode of the task rather than the saved mode. So that when someone fill in the task, they can click 'Save and New Opportunity' rather than 'Save' and then have to click 'New Opportunity'.

 

Thanks Again.