+ Start a Discussion
The_PhoenixThe_Phoenix 

Adding a Contact to an Opportunity or a Contract from the Contact Page Layout?

We have a request to be able to add a Contact to an Opportunity or a Contract from the Contact Page Layout? Currently we can create a new opportunity from the Contact layout, but we would like to be able to browse the opportunity from the contact and add the contact from that layout.  Is it something possible with sforce?

Thanks

DevAngelDevAngel

Hi The_Phoenix,

You can do just about any kind of interface you like, as long as you are willing to host the page.  This means that you would create an asp or jsp page that takes a contact id on the query string of the url and exercises the API to present a list of opportunities and/or contracts.  The user can then select the desired oppty or contract and click a button to add the contact (identified by the contact id that came in on the request) to the selected oppty or contract.

You would then create a web link that resides on the contact page to invoke the asp/jsp page that you created.

 

The_PhoenixThe_Phoenix

Hi The_Phoenix,

You can do just about any kind of interface you like, as long as you are willing to host the page.  This means that you would create an asp or jsp page that takes a contact id on the query string of the url and exercises the API to present a list of opportunities and/or contracts.  The user can then select the desired oppty or contract and click a button to add the contact (identified by the contact id that came in on the request) to the selected oppty or contract.

You would then create a web link that resides on the contact page to invoke the asp/jsp page that you created.

---

Hi Dave,

I've been going through the sforce site and webinar and can't find the exact answers to my questions:

Where is the sforce code hosted?  Let's say I need to build a functionality that would be launched from the Contact record, then present the user with a list of opportunity, and allow the user to select one of them, then create an opportunitycontactrole record from that point, where do I put all this?  If I understand well, I could do the code in .NET, and that code would need to be hosted on my webserver? or could it be all pasted in the sforce control in the "extend" section of salesforce.com?

Thanks for the clarifications.

 

DevAngelDevAngel

If it is .NET code that you've written, you would host that pages on your web server.  If it is a javascript type scontrol, then the client machine hosts the code via the browser, but the code is fetched from salesforce.com.

 

Hope this clarifys things.

darozdaroz
Actually Dave, .NET code can be hosted @ SFDC and run from there successfully...

You must use a control, it must be strongly typed, https://*.salesforce.com has to be in the IE trusted sites list and you (may) need to up the .NET trust for sites in that zone.

(The short list)

It's certainly doable.
DevAngelDevAngel

No, I understand.  We simply have a definition issue.  .NET code can be deployed from salesforce.com, but the host is the machine (os?) that the code is running on.

Might seem like we are splitting hairs, but it is important not to confuse salesforce.com's ability to deliver code versus host code.

darozdaroz
Good point - Good clarification all around tho.

And I'd like to keep as many of those hairs as I can, thank you very much. No need to go splitting them.