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
chrisCCASchrisCCAS 

Quick Question

Whats up with the fields that are like  "Claims __c" whatsup with the "__c" i was reading it meant custom. Yet i cannot query the Custom ones..which is definatly a problem. Is there a special way to query the __C ones?  When i try to it doesnt even show up under the connection.
SuperfellSuperfell
select myCustomField__c from account should work fine (assuming that in the custom field its developer name was set to myCustomField and you FLS access to the field)
chrisCCASchrisCCAS
Oh you think it could possibly be an access issue? Because im going through and theres atleast 40 differnt items Im not allowed to Query. When i view them through Sforce Explorere they show up as a Tan color.. why?
DevAngelDevAngel

Hi chrisCCAS,

If you are using the api with the same login that you are for the sforce explorer then you will have access to all the fields that are displayed in the sforce explorer.  The coloring difference is simply a visual indication that the field is in fact a custom field.

To query using a custom field:

Select Id, claims__c, Name From Account.

Custom fields are no different from standard fields once you understand that a custom field has __c appended to prevent namespace collisions in future relases.  This means the name you give the field in salesforce.com will always have __c appended to it.  Build and test your query with the sforce explorer.  Then copy and paste the query string into your code.  By the way, each field has permissions that you can inspect via the access node on the field.  If the field does not contain the queryable permission, then it's not valid for a query (not very likely to happen).

chrisCCASchrisCCAS

1) For some reason none of the things i need to get have the "queryable" access. Yet i can Query the non Custom ones fine.

I have been querying everything perfectly until I have run into these custom ones, for some reason it just flat out won't find them. When i declare a variable as a connection such as:

Dim con As sforce.Contact = CType(qr.records(intTotal), sforce.Contact)

and

Dim fName As String = con.FirstName

that works fine. However, If i try to receieve any of the "custom" ones they dont show up. when i try to .

Con.CUSTOMFIELD  it doesnt show up under the drop down.

SuperfellSuperfell
You need to regenerate your enterprise WSDL