You need to sign in to do that
Don't have an account?
sales4ce
Create a New record via Jquery pop up
Hi,
in one of our interface, we use Jquery pop up which pulls existing open opportunities. If there are no open opportunities, the user has to navigate away and create opportunities and then come back to the interface and add that newly created opportunity via the Jquery pop up.
How can we create a New Opportunity from within the jquery pop up window?
Any help is highly appreciated.
Thanks,
Sales4ce
Use the AJAX Toolkit:
http://www.salesforce.com/us/developer/docs/ajax/apex_ajax.pdf
I'm not sure if the AJAX Toolkit allows you to create popup dialogs on the fly. I used the colorbox jquery library and created a popup which allows users to edit contacts inside the dialog box. Basically it shows a custom VF page to edit contacts - you can do the same for your create new opportunity. Here's the code snippet which did the trick :-
Warning - since my custom contact related list renders inside it's own iFrame, I had to redo the entire Account page as a custom VF page.
jQuery is just the UI. The AJAX Toolkit provides the data provider you need to save the record(s) programmatically. It's really one more way to reach the same result. However, I do like your solution as well, although the only real difference is where the transaction orginates (Visualforce versus API), which is basically the opposite sides of the same technological coin.