0

I'm using Beatbox to access Salesforce's SOAP API. I can query for a series of Leads—

SELECT Id FROM Lead

Does anyone know how I can create a URL to view each Lead on the website?

2 Answers2

1

You need to find out the URL of your instance (naX.salesforce.com) and generate a link pointing to:

http://naX.salesforce.com/<leadId>

If the user is not logged in it will ask for credentials and redirect him after the login is completed.

geekymartian
  • 645
  • 5
  • 11
0

You can get the URL of your Salesforce instance from Beatbox. Assuming you started out connecting with something like this:

#!/usr/bin/env python3
from urllib.parse import urlparse
import beatbox
svc = beatbox.Client()

Get the URL here:

svc._Client__serverUrl

Format it a bit:

print('{}://{}/'.format(
    urlparse(svc._Client__serverUrl).scheme,
    urlparse(svc._Client__serverUrl).netloc)
)

Sample output:

https://na59.salesforce.com/
davejagoda
  • 2,420
  • 1
  • 20
  • 27