简体   繁体   English

获取Salesforce Lead的URL(Python Beatbox SOAP API)

[英]Get URL for Salesforce Lead (Python Beatbox SOAP API)

I'm using Beatbox to access Salesforce's SOAP API. 我正在使用Beatbox访问Salesforce的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? 有谁知道我如何创建一个URL来查看网站上的每个潜在客户?

You need to find out the URL of your instance (naX.salesforce.com) and generate a link pointing to: 您需要找出实例的URL(naX.salesforce.com)并生成指向以下内容的链接:

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. 如果用户未登录,它将要求输入凭据,并在登录完成后将其重定向。

You can get the URL of your Salesforce instance from Beatbox. 您可以从Beatbox获取Salesforce实例的URL。 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/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM