function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kevincarkevincar 

Problem with TickerSymbol

 

Hi-

This is hopefully an easy one:  I'm trying to select the account "tickersymbol" field but I keep getting "Bad Field Name" exceptions in my java query code at runtime.   I've verified that it's spelled right, and all that kind of stuff . . . Is there something I'm missing?

Kevin

 

DevAngelDevAngel

Hi kevincar,

Try TickerSymbol.

kevincarkevincar

Hi Dave,

>Try TickerSymbol.

Yes, that's actually what I did- It was the java exception code that lower-cased the symbol.

My SQL looks like:

strSFAcctsql =  "SELECT  ID, Account__c, agentNo__c, ";
strSFAcctsql += "  shippingStreet, systemModstamp, TickerSymbol, ";
strSFAcctsql += "  YTD_Count__c, YTD_VUL_GDC__c, YTD_Trades__c ";
strSFAcctsql += "FROM Account WHERE SSN__c = '" + sSqlSSNData + "'";

And my java stack trace looks like:

main[1] next
> AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
 faultSubcode:
 faultString: INVALID_FIELD: Bad field name 'tickersymbol' in select list of query call
 faultActor:
 faultNode:
 faultDetail:
        {urn:fault.enterprise.soap.sforce.com}fault:
     <sf:exceptionCode>INVALID_FIELD</sf:exceptionCode>
     <sf:exceptionMessage>Bad field name 'tickersymbol' in select list of query call</sf:exceptionMessage>


INVALID_FIELD: Bad field name 'tickersymbol' in select list of query call
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:306)
        at java.lang.Class.newInstance(Class.java:259)

. . .

What's weird to me is the "&apos;tickersymbol&apos; " in the fault-string-  My Account.java file appears OK, as does my wsdl.jsp, but the runtime-formatting of the err msg seems strange;  

KC

DevAngelDevAngel

Hi Kevin,

I just tried this with a couple different clients and did not get the error.  The only thing I can think of would be that there might be some restriction on the TickerSymbol field.  Can you verify that you can see it in the UI using the same login that you are using for the API?

kevincarkevincar

Hi Dave,

>The only thing I can think of would be that there might be some restriction on the TickerSymbol field. 

Is there some way I can check this?

>Can you verify that you can see it in the UI using the same login that you are using for the API?

Well, if I'm understanding you correctly, it's not actually displayed anywhere on the account web page. It's just defined as a salesforce.com field.

Kevin

 

DevAngelDevAngel

Hi kevincar,

Ah, that's the problem.  The fields that are available via the api reflect the fields that are available in the UI.  If you add the ticker symbol field to the account layout you will have access to it via the api.