大家好,我一直在使用salesforce Rest Api进行日志记录,现在我想使用登录调用返回给我的访问令牌来创建潜在客户。但是,当我尝试使用访问令牌创建潜在客户时,它并没有被创建,并且我得到的响应不包含Lead id。
我已经坚持了好几天了,经过大量谷歌搜索后,我找不到答案。
我想在 android 中实现这个功能,但现在我正在使用 Google chrome Plugin Advance Rest Client 进行测试。
创建潜在客户 URL--> https://na14.salesforce.com/services/data/v21.0/sobjects/Lead
标题 -->
Authorization: OAuth 00Di0000000Y4be!AR8AQHCnNzqTM1tItXuwTRdXfRmn7JbZlneSA3pMjmrw.5aZqz0JecaTj2coEXHbEi61iQEhHWg0lTc0BZ0k4U_1BccJvFaZ
有效载荷或正文 -->
{"Phone":"789452",
"Company":"Test Company",
"Fax":"1238356"
,"LastName":"Micheal"
}
内容类型: application/json
我正在使用发布请求。我得到的回应是
{
objectDescribe: {
name: "Lead"
label: "Lead"
keyPrefix: "00Q"
custom: false
labelPlural: "Leads"
layoutable: true
activateable: false
urls: {
sobject: "/services/data/v21.0/sobjects/Lead"
describe: "/services/data/v21.0/sobjects/Lead/describe"
rowTemplate: "/services/data/v21.0/sobjects/Lead/{ID}"
}-
searchable: true
deprecatedAndHidden: false
createable: true
updateable: true
deletable: true
customSetting: false
feedEnabled: true
mergeable: true
queryable: true
replicateable: true
retrieveable: true
undeletable: true
triggerable: true
}-
recentItems: [8]
0: {
attributes: {
type: "Lead"
url: "/services/data/v21.0/sobjects/Lead/--SomeId---"
}-
Id: "--SomeId---"
Name: "Luna, Wilredo"
}-
1: {
attributes: {
type: "Lead"
url: "/services/data/v21.0/sobjects/Lead/--SomeId---"
}-
Id: "--SomeId---"
Name: "Rannga, Lite"
}-
2: {
attributes: {
type: "Lead"
url: "/services/data/v21.0/sobjects/Lead/--SomeId---"
}-
Id: "--SomeId---"
Name: "Sith, Aro"
}-
3: {
attributes: {
type: "Lead"
url: "/services/data/v21.0/sobjects/Lead/--SomeId---"
}-
Id: "--SomeId---"
Name: "Smith, Aberen"
}-
4: {
attributes: {
type: "Lead"
url: "/services/data/v21.0/sobjects/Lead/--SomeId---"
}-
Id: "--SomeId---"
Name: "RANAHAN, MICHAEL"
}-
5: {
attributes: {
type: "Lead"
url: "/services/data/v21.0/sobjects/Lead/--SomeId---"
}-
Id: "--SomeId---"
Name: "RABADI, RAED"
}-
6: {
attributes: {
type: "Lead"
url: "/services/data/v21.0/sobjects/Lead/--SomeId---"
}-
Id: "--SomeId---"
Name: "A., Christopher"
}-
7: {
attributes: {
type: "Lead"
url: "/services/data/v21.0/sobjects/Lead/--SomeId---"
}-
Id: "--SomeId---"
Name: "Ratnayake, Sam"
}-
-
}