You need to sign in to do that
Don't have an account?
Is it possible to create an Opportunity from a URL link?
Hi all - hoping there are some really smart people out there that can help me vet an idea. :smileywink:
I'd like to have a clickable URL link in generated Tasks that allow a sales rep to click the link which will create an Opportunity with the Primary Campaign Source field pre-filled with a specified value.
I was thinking that the new REST API might be able to do this, but I wanted to see if the community has done this before?
The problem we are attempting to solve is taking the burden off Sales reps for attaching certain opportunities to specific campaigns.
For reasons I won't get in to, using the contact's previous campaign (default behavior) isn't sufficient.
Thanks all!
Best,
IW
A Visualforce page with the appropriate controller logic should be able to do that. You can pass the ID's of the task/campaign/etc in the URL, the controller can pick it up, create the opportunity and the forward the user to where they need to go.
All Answers
A Visualforce page with the appropriate controller logic should be able to do that. You can pass the ID's of the task/campaign/etc in the URL, the controller can pick it up, create the opportunity and the forward the user to where they need to go.
I like this idea - I'm new to visualforce pages, but not to coding.
After 20 minutes of reviewing the development guide, I think I could have a proof of concept built in little time.
Thanks for the great idea!
Best,
IW
So I've been tinkering with this in my spare time, attempting to build a proof of concept, and I'm not having much luck.
If you or another member of the community could offer some help, I would appreciate it.
The inline visual force page that I want to show up on the task is displaying "Content cannot be displayed: DML currently not allowed".
The expected display is a link, that when clicked, will create an opportunity with the name "Acme".
This is my visualforce page code:
My apex code is this (intended to execute when one clicks on the above link):
This is intended to be a simplified proof of concept, but I can't see where I am failing. Does anyone have any suggestions?
Thanks,
IW
It's using DML in the page constructor that is throwing the error. Refer to the function in need in the action attribute of the page tag instead.
Thank you, Josh -
I also found out my syntax was off as well:
http://boards.developerforce.com/t5/Visualforce-Development/Help-Requested-Create-new-Opp-from-visualforce-page-hyperlink/td-p/238289
Thanks again for your help.
Best,
Iw