You need to sign in to do that
Don't have an account?
error which makes no sense: "...sObject type 'Lead' is not supported."
Hi all,
I am developing a sample Flex app in Force.com, which seems have problem to reach some standard objects like Product2 and Lead; but the same code ok with others like User and Account. (I was using SessionId to login.)
Thanks for your help!
~K.F.
Here is the error message, while try Query Lead:
(com.salesforce.results::Fault)#0
context = (null)
detail = (Object)#1
InvalidSObjectFault = (Object)#2
column = 52
exceptionCode = "INVALID_TYPE"
exceptionMessage = "
LastName,Id, Email, Company from Lead
^
ERROR at Row:1:Column:52
sObject type 'Lead' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names."
row = 1
xsi:type = "sf:InvalidSObjectFault"
faultcode = "sf:INVALID_TYPE"
faultstring = "INVALID_TYPE:
LastName,Id, Email, Company from Lead
^
ERROR at Row:1:Column:52
sObject type 'Lead' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names."
Stanley,
Which version of the API are you using?
Also, you might want to check out this page and see if it sparks anything:
Developing Salesforce.com Applications With Flex And Visualforce
HTH
Jeff Douglas
Appirio, Inc.
http://blog.jeffdouglas.com
Hi Jeff,
Actually your that page was my starting point. Thanks for sharing!
To make your code working in my Force.com account, I did two changes - hopefully it is useful for others:
1. server_url was changed to:
<salesforce:Connection id="apex" serverUrl="https://www.salesforce.com/services/Soap/u/13.0" />
2. Following this workaround I also modified the VF page, otherwise I can not get session_id:
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=12373#M12373
My same code has no problem against User table, but not Lead. My guess, it might be related to "field access", or "Org leve sharing", or "partner user right", or something to do with Force.com vs DA, ... I am still working on fix.
Thanks,
~Stanley
Stanley,
Glad you got it to work (or are in the process of doing so). Correct, my example is logging into a Sandbox and not a Production or Developer org. Glad you got that figured out.
Not sure why the session id is not working?? I have a number of apps that are working in production without that mod. Perhaps I'll investigate it when I have a chance.
Thanks
Jeff Douglas
Appirio, Inc.
http://blog.jeffdouglas.com
Hi Bulen,
Out of curicity, I packed my sample Flex and other supply code into a private-appexchange-package, and deployed it into an DA account. It behaved the same - my that DA account is so old, I cannot even enable Site. Seems to me, it is not related to Sites.
Still not sure where the problem came from.
Thanks for your help!
~Stanley
Make sure you're using the right API Version.
Ex:
/services/data/v39.0/query?q=
/services/data/v45.0/query?q=