You need to sign in to do that
Don't have an account?
GrantSchenck
Creating New Contact
We are developing a Telephone interface modeled on the STAPI sample. In that regard, we want to handle the situation where a caller ID doesn't match any record by sending the user to the New Contact page with the phone number field populated. The user would then supply a last name and any other details and save (or not) the resulting new contact record.
What the the steps I need to do to actually do this programatically?
Thanks,
Grant Schenck
ShoreTel
What the the steps I need to do to actually do this programatically?
Thanks,
Grant Schenck
ShoreTel
https://na1.salesforce.com/secur/frontdoor.jsp?sid=<sessionid>&retUrl=/003/e
https://na1.salesforce.com/secur/frontdoor.jsp?sid=&retUrl=/003/e
If I just type that in replacing the sessionid with my session ID should that take me to the contacts page? When I try it, I just go to the home page (https://na1.salesforce.com/home/home.jsp)...
I'm not clear what you mean about UI. I have a phone number I got from my phone system, I look it up and get no hits so I want to provide a popup to allow the user to go to the SF create a contact page with the number already plugged into the "Phone" field
In that regards, is there anyway to populate the "Phone" field of the new contact once I get it to take me to the new contact page work?
Thanks
There are some unsupported ways to prepopulate parts of a new record. What you can do is add more to the retURL (escaping is really important from here on). For adding a phone number to the Phone number field you could make the return url retURL=/003/e&con10=6503666658.
con10 is a wacky field name for the Phone number input box and when the page loads it will try to find any query params that match form fields and preset the values.
Regards.
I spoke too fast.
If I just surf to a new contact form and then splice on the "&con10=12345" and hit enter that works. Specifically I'm on the new contact page with the phone number set to 12345. However, if from my code I form up the URL with the SID and tack on the same "&con10=12345" I just go to the new contact page but without the phone number filled in.
Any ideas?
Regards
Not sure what exactly you mean.
I form up my URL as so:
string retURL = m_strHomeURL + "&retURL=/003/e&con10=" + strPhoneNumber;
where the m_strHomeURL has my URL + SID
What would I need to alter to get it work?
Assuming that m_strHomeURL contains the frontdoor.jsp syntax (https://<host>/secur/frontdoor.jsp?sid=<sessionId>) then for the retURL you should use &retURL=/003/e%26con10%3d" + strPhoneNumber.
%26 = &
%3d = =
I'm not able to test this until next week but I'll let you (and others) know how things worked out.
Regards, Grant
Here is what URL I generate to try to go to the create contact page with the phone field filled in:
https://na1-api.salesforce.com/secur/frontdoor.jsp?sid=dXEQQjT0S7RCgBFER6fC6Bbw7XrOIolH1tYlh690SoBgD.dpoYNAOazbKKiyrZ22dzj8GxOu7ZSE9aErZC7PmmpYnKO9AsNCSeX5jsUoLXQ=&retURL=/003/e%26con10%3d152
Instead I go to:
"URL No Longer Exists" page. I see IE changes the URL to:
https://na1-api.salesforce.com/003/e&con10=152
So, what the heck am I doing wrong? I tried endless variants but can't see to get it to work.
Thanks, Grant
For making calls, we provide an Internet Explorer toolbar which watches for SF page downloads and if the page has number fields (determined via our tray icon server querying SF via web services) then we list those on the tool bar and a user can select one of the numbers from a list box associated with the toolbar and call the party. They can also call in such a way that the browser will automatically open a "Log a Call" page.
Our intent is to provide both built binaries as well as the source so that users who wish to customize it in ways we haven't anticipated are free to do so. Because of the reliance on our own COM object this won't usable on non-ShoreTel systems.
Grant Schenck